DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

[SPIR-V] Unable to set 'unknown' format when using image_format attribute

Open Keenuts opened this issue 1 year ago • 1 comments

Description

Context: https://github.com/microsoft/DirectXShaderCompiler/issues/6979#issuecomment-2427553483 Repro:

// RUN: %dxc -T cs_6_7 -E main -spirv -fspv-target-env=vulkan1.3 %s
[[vk::binding(0,0)]]
[[vk::image_format("unknown")]]
RWTexture3D<float32_t2> untypedImage;

[numthreads(8,8,8)]
void main(uint32_t3 gl_GlobalInvocationID : SV_DispatchThreadID)
{
    untypedImage[gl_GlobalInvocationID] = float32_t2(4,5);
}

Actual Behavior DXC generates Rg32f as format for untypedImage instead of the requested Unknown.

Keenuts avatar Oct 22 '24 14:10 Keenuts

@devshgraphicsprogramming to track this specific issue.

Keenuts avatar Oct 22 '24 14:10 Keenuts

spirv-tools fix in, now I need to bring it to DXC

Keenuts avatar Oct 24 '24 11:10 Keenuts