Skip to content

[Vulkan, Glslang]: Storage texture format not patched in SPIR-V compiled from HLSL via glslang #763

Description

@MikhailGorobets

On the Vulkan backend, the storage texture format isn’t being patched in SPIR-V compiled from HLSL via glslang.
For a texture defined as VK_IMAGE_FORMAT("r11g11b10f") RWTexture2D<float3 /*format=r11f_g11f_b10f*/> g_TextureRadiance;
I get the following error from the validation layers:

Diligent Engine: ERROR: Vulkan debug message (validation): VUID-RuntimeSpirv-OpImageWrite-07112
                 Validation Error: [ VUID-RuntimeSpirv-OpImageWrite-07112 ] Object 0: handle = 0x9fba48000000204a, name = ComputeGroundTruthRadiance-CS [C448EE8E6962D9F26E992A5B37246626], type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x7fcb0409 | vkCreateComputePipelines(): pCreateInfos[0].stage SPIR-V OpImageWrite Texel operand only contains 3 components, but the OpImage format mapping to VK_FORMAT_R32G32B32A32_SFLOAT has 4 components.
OpImageWrite %2333 %2358 %5779
%2206 = OpTypeImage %6 1 0 0 0 2 1
. The Vulkan spec states: OpImageWrite to any Image whose Image Format is not Unknown must have the Texel operand contain at least as many components as the corresponding VkFormat as given in the SPIR-V Image Format compatibility table (https://vulkan.lunarg.com/doc/view/1.3.280.0/windows/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-OpImageWrite-07112)
                 Object[0] (shader module): Handle 0x9fba48000000204a, Name: 'ComputeGroundTruthRadiance-CS [C448EE8E6962D9F26E992A5B37246626]'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions