[Mesa-dev] [PATCH 6/7] st/glsl_to_tgsi: cleanup using visit_generic_intrinsic
Nicolai Hähnle
nhaehnle at gmail.com
Wed Apr 19 08:56:52 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
It turns out that explicitly setting the writemask isn't actually
needed; emit_asm does the right thing based on looking at the types.
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index dfcb622..c0f8d7c 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3982,29 +3982,23 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
case ir_intrinsic_image_atomic_and:
case ir_intrinsic_image_atomic_or:
case ir_intrinsic_image_atomic_xor:
case ir_intrinsic_image_atomic_exchange:
case ir_intrinsic_image_atomic_comp_swap:
case ir_intrinsic_image_size:
case ir_intrinsic_image_samples:
visit_image_intrinsic(ir);
return;
- case ir_intrinsic_shader_clock: {
- ir->return_deref->accept(this);
-
- st_dst_reg dst = st_dst_reg(this->result);
- dst.writemask = TGSI_WRITEMASK_XY;
-
- emit_asm(ir, TGSI_OPCODE_CLOCK, dst);
+ case ir_intrinsic_shader_clock:
+ visit_generic_intrinsic(ir, TGSI_OPCODE_CLOCK);
return;
- }
case ir_intrinsic_vote_all:
visit_generic_intrinsic(ir, TGSI_OPCODE_VOTE_ALL);
return;
case ir_intrinsic_vote_any:
visit_generic_intrinsic(ir, TGSI_OPCODE_VOTE_ANY);
return;
case ir_intrinsic_vote_eq:
visit_generic_intrinsic(ir, TGSI_OPCODE_VOTE_EQ);
return;
--
2.9.3
More information about the mesa-dev
mailing list