Mesa (master): i965: remove unneeded src_reg copy in emit_shader_time_write

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Oct 28 09:28:57 UTC 2015


Module: Mesa
Branch: master
Commit: bfc73ff10eafad59b6ae9ca3991f9f1a3700b3a1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfc73ff10eafad59b6ae9ca3991f9f1a3700b3a1

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Wed Oct  7 12:38:12 2015 +0100

i965: remove unneeded src_reg copy in emit_shader_time_write

The variable is already of type src_reg. creating a new instance only to
destroy it seems unnecessary.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_vec4.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 71a5a44..f87b86f 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1788,7 +1788,7 @@ vec4_visitor::emit_shader_time_write(int shader_time_subindex, src_reg value)
    emit(MOV(offset, src_reg(index * SHADER_TIME_STRIDE)));
 
    time.type = BRW_REGISTER_TYPE_UD;
-   emit(MOV(time, src_reg(value)));
+   emit(MOV(time, value));
 
    vec4_instruction *inst =
       emit(SHADER_OPCODE_SHADER_TIME_ADD, dst_reg(), src_reg(dst));




More information about the mesa-commit mailing list