Skip to content

[SPIR-V] vk::image_format no work with bindless array. #6880

@qiutang98

Description

@qiutang98

Problem shader

[[vk::image_format("r16f")]] [[vk::binding(3, 0)]] RWTexture2D<float> RWTextureBindless[]; [[vk::image_format("r16f")]] [[vk::binding(0, 1)]] globallycoherent RWTexture2D<float> mip5Dest;

The compiled result translate to GLSL by SPIRV-Cross:

layout(set = 0, binding = 3, r32f) uniform writeonly image2D RWTextureBindless[]; layout(set = 1, binding = 0, r16f) uniform coherent image2D mip5Dest;

When watching SPIR-V Asm, can find it still use r32f:

%type_2d_image_0 = OpTypeImage %float 2D 2 0 0 2 R32f %type_2d_image_1 = OpTypeImage %float 2D 2 0 0 2 R16f // ... %638 = OpAccessChain %_ptr_UniformConstant_type_2d_image_0 %RWTextureBindless %636 %639 = OpLoad %type_2d_image_0 %638 // ... %512 = OpLoad %type_2d_image_1 %mip5Dest

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Status

Done

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions