# Error with glsl shader extentions

**URL:** <https://discourse.libsdl.org/t/error-with-glsl-shader-extentions/69640>\
**Category:** SDL Development\
**Created:** [October 25, 2026, 3:57pm UTC](https://discourse.libsdl.org/t/error-with-glsl-shader-extentions/69640 "2026-10-25T15:57:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![feb.13](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/f/c2a13f/32.png) [@feb.13](https://discourse.libsdl.org/u/feb.13)\
**Post date:** [October 25, 2026, 3:57pm UTC](https://discourse.libsdl.org/t/error-with-glsl-shader-extentions/69640/1 "2026-10-25T15:57:58Z")

</div>

Hello, Im using sdl3 GPU and converting glsl to spir-V. I’m using the glsl extention GL\_EXT\_fragment\_shader\_barycentric.

Written in glsl like this:

```auto
#extension GL_EXT_fragment_shader_barycentric : enable

```

The extension seems to work fine, looking at what I am rendering, but even so I get this error message: (btw, this error message pops up when i create a shader with sdl.CreateGPUShader())

```auto
Validation Error: [VUID-VkShaderModuleCreateInfo-pCode-08740] | MessageID = 0x6e224e9
vkCreateShaderModule(): SPIR-V Capability FragmentBarycentricKHR was declared, but one of the following requirements is required (VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR::fragmentShaderBarycentric OR VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV::fragmentShaderBarycentric).
The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://docs.vulkan.org/spec/latest/chapters/shaders.html#VUID-VkShaderModuleCreateInfo-pCode-08740)

Validation Error: [VUID-VkShaderModuleCreateInfo-pCode-08742] | MessageID = 0xfc68be96
vkCreateShaderModule(): SPIR-V Extension SPV_KHR_fragment_shader_barycentric was declared, but one of the following requirements is required (VK_KHR_fragment_shader_barycentric).
The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://docs.vulkan.org/spec/latest/chapters/shaders.html#VUID-VkShaderModuleCreateInfo-pCode-08742)

```

So I want to get rid of this error message, so in Odin-lang, I try to use sdl.CreateGPUDeviceWithProperties(), and bring in some properties

```auto
make_properties :: proc() -> sdl.PropertiesID {
    
    barycentric_features := vk.PhysicalDeviceFragmentShaderBarycentricFeaturesKHR {
        sType = vk.StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR,
        pNext = nil,
        fragmentShaderBarycentric = true,
    }
    ext_name := cstring("VK_KHR_fragment_shader_barycentric")
    dExtension_list := [1]cstring{ ext_name }
    
    vk_options := sdl.GPUVulkanOptions {
        vulkan_api_version = vk.API_VERSION_1_0, // Feature list requires Vulkan 1.1+
        feature_list = &barycentric_features,
        device_extension_count = 1,
        device_extension_names = &dExtension_list[0],
        
    }

    props := sdl.CreateProperties()
    fmt.assertf(sdl.SetPointerProperty(props, sdl.PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER, &vk_options),
    "Could not add on properties", sdl.GetError())

    return props
}

```

I do this both when I create the GPU-device, and with the properties property in the createShaderInfo struct. The rendering works as expected, but I STILL get the error messages. So I go into khronos’s website, I have no idea what they mean with:

-“if pCode is a pointer to SPIR-V code, and `pCode` declares any of the capabilities listed in the [SPIR-V Environment](https://docs.vulkan.org/spec/latest/appendices/spirvenv.html#spirvenv-capabilities-table) appendix, one of the corresponding requirements **must** be satisfied”

and I try to add on the instance extension: vk.KHR\_GET\_PHYSICAL\_DEVICE\_PROPERTIES\_2\_EXTENSION\_NAME, specified in the extention appendicies “[https://docs.vulkan.org/spec/latest/appendices/extensions.html#VK\_KHR\_fragment\_shader\_barycentric](https://docs.vulkan.org/spec/latest/appendices/extensions.html#VK_KHR_fragment_shader_barycentric)”, but the error message still pops up. Does anybody know what I’m doing wrong???
