Mesa (master): radeonsi: minor cleanup of si_update_vs_writes_viewport_index

Marek Olšák mareko at kemper.freedesktop.org
Sat Oct 7 16:30:01 UTC 2017


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Oct  6 00:14:17 2017 +0200

radeonsi: minor cleanup of si_update_vs_writes_viewport_index

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/gallium/drivers/radeonsi/si_pipe.h           | 2 +-
 src/gallium/drivers/radeonsi/si_state_shaders.c  | 6 +++---
 src/gallium/drivers/radeonsi/si_state_viewport.c | 6 +++++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 4186c75b50..cf36100dc9 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -576,7 +576,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
 						 const struct pipe_video_buffer *tmpl);
 
 /* si_viewport.c */
-void si_update_vs_writes_viewport_index(struct si_context *ctx);
+void si_update_vs_viewport_state(struct si_context *ctx);
 void si_init_viewport_functions(struct si_context *ctx);
 
 
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 2e636f5cdc..90c3cf7e63 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -2309,7 +2309,7 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
 	sctx->num_vs_blit_sgprs = sel ? sel->info.properties[TGSI_PROPERTY_VS_BLIT_SGPRS] : 0;
 
 	si_update_common_shader_state(sctx);
-	si_update_vs_writes_viewport_index(sctx);
+	si_update_vs_viewport_state(sctx);
 	si_set_active_descriptors_for_shader(sctx, sel);
 	si_update_streamout_state(sctx);
 	si_update_clip_regs(sctx, old_hw_vs, old_hw_vs_variant,
@@ -2352,7 +2352,7 @@ static void si_bind_gs_shader(struct pipe_context *ctx, void *state)
 		if (sctx->ia_multi_vgt_param_key.u.uses_tess)
 			si_update_tess_uses_prim_id(sctx);
 	}
-	si_update_vs_writes_viewport_index(sctx);
+	si_update_vs_viewport_state(sctx);
 	si_set_active_descriptors_for_shader(sctx, sel);
 	si_update_streamout_state(sctx);
 	si_update_clip_regs(sctx, old_hw_vs, old_hw_vs_variant,
@@ -2403,7 +2403,7 @@ static void si_bind_tes_shader(struct pipe_context *ctx, void *state)
 		si_shader_change_notify(sctx);
 		sctx->last_tes_sh_base = -1; /* invalidate derived tess state */
 	}
-	si_update_vs_writes_viewport_index(sctx);
+	si_update_vs_viewport_state(sctx);
 	si_set_active_descriptors_for_shader(sctx, sel);
 	si_update_streamout_state(sctx);
 	si_update_clip_regs(sctx, old_hw_vs, old_hw_vs_variant,
diff --git a/src/gallium/drivers/radeonsi/si_state_viewport.c b/src/gallium/drivers/radeonsi/si_state_viewport.c
index 84f8cd8827..0d280f6e38 100644
--- a/src/gallium/drivers/radeonsi/si_state_viewport.c
+++ b/src/gallium/drivers/radeonsi/si_state_viewport.c
@@ -385,12 +385,16 @@ static void si_emit_viewport_states(struct r600_common_context *rctx,
 }
 
 /**
+ * This reacts to 2 state changes:
+ * - VS.writes_viewport_index
+ * - VS output position in window space (enable/disable)
+ *
  * Normally, we only emit 1 viewport and 1 scissor if no shader is using
  * the VIEWPORT_INDEX output, and emitting the other viewports and scissors
  * is delayed. When a shader with VIEWPORT_INDEX appears, this should be
  * called to emit the rest.
  */
-void si_update_vs_writes_viewport_index(struct si_context *ctx)
+void si_update_vs_viewport_state(struct si_context *ctx)
 {
 	struct tgsi_shader_info *info = si_get_vs_info(ctx);
 	bool vs_window_space;




More information about the mesa-commit mailing list