Mesa (10.3): r600g: only init GS_VERT_ITEMSIZE on r600

Emil Velikov evelikov at kemper.freedesktop.org
Thu Dec 11 13:20:53 UTC 2014


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Dec 10 13:48:29 2014 +1000

r600g: only init GS_VERT_ITEMSIZE on r600

On evergreen there are 4 regs, on r600/700 there is only one.

Don't initialise regs and trash someone elses state.

Not sure this fixes anything, but hey one less stupid.

Reviewed-By: Glenn Kennard <glenn.kennard at gmail.com>
Cc: "10.3 10.4" mesa-stable at lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied at redhat.com>
(cherry picked from commit 7f21cf71989ba780639594ebb34d6e7345b08436)

---

 src/gallium/drivers/r600/r600_state.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 65b44b9..806ef5b 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -2615,11 +2615,8 @@ void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
 	r600_store_context_reg(cb, R_028A6C_VGT_GS_OUT_PRIM_TYPE,
 			       r600_conv_prim_to_gs_out(rshader->gs_output_prim));
 
-	r600_store_context_reg_seq(cb, R_0288C8_SQ_GS_VERT_ITEMSIZE, 4);
-	r600_store_value(cb, cp_shader->ring_item_size >> 2);
-	r600_store_value(cb, 0);
-	r600_store_value(cb, 0);
-	r600_store_value(cb, 0);
+	r600_store_context_reg(cb, R_0288C8_SQ_GS_VERT_ITEMSIZE,
+	                       cp_shader->ring_item_size >> 2);
 
 	r600_store_context_reg(cb, R_0288A8_SQ_ESGS_RING_ITEMSIZE,
 			       (rshader->ring_item_size) >> 2);




More information about the mesa-commit mailing list