Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIR-V][Feature Request][SM6.7] Implement GatherRaw in the SPIR-V backend #6611

Open
Keenuts opened this issue May 13, 2024 · 2 comments
Open
Labels
enhancement Feature suggestion sm6.7 spirv Work related to SPIR-V

Comments

@Keenuts
Copy link
Collaborator

Keenuts commented May 13, 2024

Shader Model 6.7 added Raw Gather Methods which are currently unimplemented in the SPIR-V backend.

Texture2D<uint32_t> tex;
SamplerState samplerState;

float4 main() : SV_Target {
  uint4 res = tex.GatherRaw(samplerState, float2(0, 0));
  return float(res.x).xxxx;
}
dxc -T ps_6_7 shader.hlsl -spirv
shader.hlsl:5:19: error: intrinsic 'GatherRaw' method unimplemented
  uint4 res = tex.GatherRaw(samplerState, float2(0, 0));
                  ^
@Keenuts Keenuts added enhancement Feature suggestion spirv Work related to SPIR-V labels May 13, 2024
@Keenuts Keenuts changed the title [SPIR-V][Feature Request] Implement GatherRaw in the SPIR-V backend [SPIR-V][Feature Request][SM6.7] Implement GatherRaw in the SPIR-V backend May 13, 2024
@Keenuts Keenuts added the sm6.7 label May 13, 2024
@s-perron
Copy link
Collaborator

I don't think this can be implemented in a straight forward way. The problem is that the new instruction retrieves "a single value that represents a raw, bitwise copy of all of the element’s channels without any conversion of texture contents." As far a I can tell, no existing Vulkan instruction will do that.

@s-perron
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature suggestion sm6.7 spirv Work related to SPIR-V
Projects
None yet
Development

No branches or pull requests

2 participants