-
Notifications
You must be signed in to change notification settings - Fork 659
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
[SPIRV] Can't use Buffer<half> in shader #4372
Labels
spirv
Work related to SPIR-V
Comments
|
sudonatalie
added a commit
to sudonatalie/DirectXShaderCompiler
that referenced
this issue
Feb 5, 2024
According to the Vulkan spec: OpTypeImage must declare a scalar 32-bit float, 64-bit integer, or 32-bit integer type for the “Sampled Type” (RelaxedPrecision can be applied to a sampling instruction and to the variable holding the result of a sampling instruction) We want to avoid translating a true HLSL 16-bit floating point texture object to a 32-bit texture object with relaxed precision, as this will break backwards compatibility if Vulkan does support 16-bit texture types in the future. This change adds an error message in cases where the code generated would otherwise fail validation for the above reasons. Closes microsoft#4372
sudonatalie
added a commit
that referenced
this issue
Feb 6, 2024
According to the Vulkan spec: OpTypeImage must declare a scalar 32-bit float, 64-bit integer, or 32-bit integer type for the “Sampled Type” (RelaxedPrecision can be applied to a sampling instruction and to the variable holding the result of a sampling instruction) We want to avoid translating a true HLSL 16-bit floating point texture object to a 32-bit texture object with relaxed precision, as this will break backwards compatibility if Vulkan does support 16-bit texture types in the future. This change adds an error message in cases where the code generated would otherwise fail validation for the above reasons. Closes #4372
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A simple HLSL:
compiled with ps_6_2 -enable-16bit-types and -spirv. It returns an error message:
StructuredBuffer is OK, but Buffer doesn't. It's related to #1672.
The text was updated successfully, but these errors were encountered: