summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-09-13 15:57:58 +0200
committerSamuel Pitoiset <[email protected]>2018-09-14 10:59:52 +0200
commitfbc064a5b45d424612df3d92d465a956460af44e (patch)
treee9566e34f12729ee812b4ccedb73206a2c265844 /src
parentf398595dca302008b77468557a30796477d90b62 (diff)
radv: make use of the output usage mask in GS copy shader
This is just for consistency because LLVM can detect and remove unused loads. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_nir_to_llvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index e9842af10d2..a96cc34fefc 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -3609,6 +3609,9 @@ ac_gs_copy_shader_emit(struct radv_shader_context *ctx)
for (unsigned j = 0; j < length; j++) {
LLVMValueRef value, soffset;
+ if (!(output_usage_mask & (1 << j)))
+ continue;
+
soffset = LLVMConstInt(ctx->ac.i32,
(slot * 4 + j) *
ctx->gs_max_out_vertices * 16 * 4, false);