summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_shader_abi.h
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-10-23 03:27:28 +0200
committerBas Nieuwenhuizen <[email protected]>2017-10-23 09:13:38 +0200
commita548b727a147b4ead1accef10499c4cf81af3057 (patch)
treedbbbfdbfcad21ba2dd07543eb0baab6bee959af5 /src/amd/common/ac_shader_abi.h
parentc07d719e8b683e1bf78f187dd17fe4716f4e5e9c (diff)
ac/nir: Only clamp shadow reference on radeonsi.
Vulkan CTS does not expect the value to be clamped (at least for D32), and it makes a differences even though depth is in [0,1], due to strict inequalities. I couldn't find anything in the Vulkan spec about this, but the test seemed to be copied from GL tests and the GL spec only specifies clamping for fixed point formats. Hence I expect radeonsi to run into this at some point as well, but given that they still have a usecase with the Z16->Z32 promotion, I'll leave that for someone else to clean up. This at least fixes radv dEQP-VK.texture.shadow.* on VI. Fixes: 0f9e32519bb 'ac/nir: clamp shadow texture comparison value on VI' Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_shader_abi.h')
-rw-r--r--src/amd/common/ac_shader_abi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h
index 5f296be0c1f..14517d55700 100644
--- a/src/amd/common/ac_shader_abi.h
+++ b/src/amd/common/ac_shader_abi.h
@@ -88,6 +88,10 @@ struct ac_shader_abi {
LLVMValueRef index,
enum ac_descriptor_type desc_type,
bool image, bool write);
+
+ /* Whether to clamp the shadow reference value to [0,1]on VI. Radeonsi currently
+ * uses it due to promoting D16 to D32, but radv needs it off. */
+ bool clamp_shadow_reference;
};
#endif /* AC_SHADER_ABI_H */