Is your feature request related to a problem? Please describe.
In Vulkan/SPIR-V, for every type of sampling operation you can do, there exists a corresponding comparison sample operation. Shader model 6.7's "advanced texture ops" improved the situation by adding explicit-LOD comparison sampling, but D3D/DXIL is still missing:
- Bias
- Gradient
- Mip level computation (must be passed a non-comparison sampler)
Describe the solution you'd like
I'd like to see shader model 6.8 add new intrinsics for these operations, or relax restrictions (e.g. mip level computation simply fails DXIL validation).
Describe alternatives you've considered
The only alternative I can see would be to add a non-comparison sampler to the shader for every comparison sampler, and to rewrite the shader for bias to explicitly compute derivatives, and then for bias/gradient to explicitly compute a mip level (using the non-comparison sampler), and then do an explicit-LOD sample. This is... ugly.
Additional context
This is needed for VulkanOn12 aka Dozen.
Is your feature request related to a problem? Please describe.
In Vulkan/SPIR-V, for every type of sampling operation you can do, there exists a corresponding comparison sample operation. Shader model 6.7's "advanced texture ops" improved the situation by adding explicit-LOD comparison sampling, but D3D/DXIL is still missing:
Describe the solution you'd like
I'd like to see shader model 6.8 add new intrinsics for these operations, or relax restrictions (e.g. mip level computation simply fails DXIL validation).
Describe alternatives you've considered
The only alternative I can see would be to add a non-comparison sampler to the shader for every comparison sampler, and to rewrite the shader for bias to explicitly compute derivatives, and then for bias/gradient to explicitly compute a mip level (using the non-comparison sampler), and then do an explicit-LOD sample. This is... ugly.
Additional context
This is needed for VulkanOn12 aka Dozen.