Mesa (main): aco: remove unreachable code about viewport index/layer and mesh shaders
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 13 14:39:51 UTC 2022
Module: Mesa
Branch: main
Commit: 76356ed2082f57db3d5d73cfee383a51980cba9a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=76356ed2082f57db3d5d73cfee383a51980cba9a
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue May 10 19:33:37 2022 +0200
aco: remove unreachable code about viewport index/layer and mesh shaders
If the mesh shaders exports the viewport index or the layer, the value
can't be NULL, and it should be implicitly zero.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16438>
---
src/amd/compiler/aco_instruction_selection.cpp | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 5a10c8a0e77..e58e7de3fb8 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -10669,12 +10669,6 @@ create_primitive_exports(isel_context *ctx, Temp prim_ch1)
Builder bld(ctx->program, ctx->block);
- /* Use zeroes if the shader doesn't write these but they are needed by eg. PS. */
- if (outinfo->writes_layer_per_primitive && !ctx->outputs.mask[VARYING_SLOT_LAYER])
- ctx->outputs.temps[VARYING_SLOT_LAYER * 4u] = bld.copy(bld.def(v1), Operand::c32(0));
- if (outinfo->writes_viewport_index_per_primitive && !ctx->outputs.mask[VARYING_SLOT_VIEWPORT])
- ctx->outputs.temps[VARYING_SLOT_VIEWPORT * 4u] = bld.copy(bld.def(v1), Operand::c32(0));
-
/* When layer, viewport etc. are per-primitive, they need to be encoded in
* the primitive export instruction's second channel. The encoding is:
* bits 31..30: VRS rate Y
More information about the mesa-commit
mailing list