From 092337a67e7ef8ec108cab9cb6679e59bb2ff791 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 4 Aug 2020 19:34:33 -0400 Subject: Sampler Feedback improvements (#1475) * Add the Feedback texture types. Depreciate SLANG_RESOURCE_EXT_SHAPE_MASK. * Starting point to test sampler feedback. * WIP on FeedbackSampler. * Use __target_intrinsic to override the output of sampler feedback types. * Use newer generic syntax for FeedbackTexture. * Reflects Feedback type. * SLANG_TYPE_KIND_TEXTURE_FEEDBACK -> SLANG_TYPE_KIND_FEEDBACK * Added reflection test. * Reneable issue with generics in sampler-feedback-basic.slang * Add methods to FeedbackTexture2D/Array. Make test cover test cases. * Sampler feedback produces DXC code. * Disabled Sampler feedback test - as requires newer version of DXC. * Fix bug in reflection tool output. * Fix problem with direct-spirv-emit.slang.expected due to update to glslang. * Fix direct-spirv-emit.slang * Use SLANG_RESOURCE_EXT_SHAPE_MASK again * Make Feedback be emitted as a textue type prefix. * Add support for GetDimensions to FeedbackTexture2D * WIP on CPU sampler feedback. Update of target compatibility. * Fix some bugs in C++ feedback sampler. Fix GetDimensions for FeedbackTextures. Run 'Compile' test for CPU compute feedback texture test. Update target-compatability.md * Fix GetDimensions call on feedback sampler. * Small documentation improvements. Co-authored-by: Tim Foley --- docs/target-compatibility.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/target-compatibility.md b/docs/target-compatibility.md index 898a59fd3..e4c4a8496 100644 --- a/docs/target-compatibility.md +++ b/docs/target-compatibility.md @@ -39,6 +39,7 @@ Items with ^ means there is some discussion about support later in the document | `[unroll]` | Yes | Yes | Yes ^ | Yes | Limited + | Atomics | Yes | Yes | Yes | Yes | No + | Atomics on RWBuffer | Yes | Yes | Yes | No | No + +| Sampler Feedback | No | Yes | No + | No | Yes ^ ## Half Type @@ -169,3 +170,12 @@ For VK the GLSL output from Slang seems plausible, but VK binding fails in tests On CUDA RWBuffer becomes CUsurfObject, which is a 'texture' type and does not support atomics. On the CPU atomics are not supported, but will be in the future. + +## Sampler Feedback + +The HLSL [sampler feedback feature](https://microsoft.github.io/DirectX-Specs/d3d/SamplerFeedback.html) is available for DirectX12. The features requires shader model 6.5 and therefore a version of [DXC](https://github.com/Microsoft/DirectXShaderCompiler) that supports that model or higher. The Shader Model 6.5 requirement also means only DXIL binary format is supported. + +There doesn't not appear to be a similar feature available in Vulkan yet, but when it is available support should be addeed. + +For CPU targets there is the IFeedbackTexture interface that requires an implemention for use. Slang does not currently include CPU implementations for texture types. + -- cgit v1.2.3