summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-08-30 09:43:29 +0200
committerSamuel Pitoiset <[email protected]>2018-08-31 17:34:41 +0200
commit730c704f862b7a2455400c7255d7345ee728e659 (patch)
tree2230193e29268a5621362dec7c565e3f5f688625 /src/amd
parentffe3a2a298da78d68742d3683109b5cd8e13c656 (diff)
radv: gather the output usage mask for clip/cull distances correctly
It's a special case because both are combined into a single array. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_shader_info.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c
index 5925fd924c8..6262acb1a65 100644
--- a/src/amd/vulkan/radv_shader_info.c
+++ b/src/amd/vulkan/radv_shader_info.c
@@ -128,6 +128,14 @@ set_output_usage_mask(const nir_shader *nir, const nir_intrinsic_instr *instr,
get_deref_offset(deref_instr, &const_offset);
+ if (idx == VARYING_SLOT_CLIP_DIST0) {
+ /* Special case for clip/cull distances because there are
+ * combined into a single array that contains both.
+ */
+ output_usage_mask[idx] |= 1 << const_offset;
+ return;
+ }
+
for (unsigned i = 0; i < attrib_count; i++) {
output_usage_mask[idx + i + const_offset] |=
instr->const_index[0] << comp;