[Mesa-dev] [PATCH 6/8] radeonsi: set current_rast_prim in the right place
Marek Olšák
maraeo at gmail.com
Mon Feb 23 12:03:10 PST 2015
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_state_draw.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 511bea2..cb147c3 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -502,12 +502,18 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
if (!sctx->ps_shader || !sctx->vs_shader)
return;
+ si_decompress_textures(sctx);
+
+ /* Set the rasterization primitive type.
+ *
+ * This must be done after si_decompress_textures, which can call
+ * draw_vbo recursively, and before si_update_shaders, which uses
+ * current_rast_prim for this draw_vbo call. */
if (sctx->gs_shader)
sctx->current_rast_prim = sctx->gs_shader->gs_output_prim;
else
sctx->current_rast_prim = info->mode;
- si_decompress_textures(sctx);
si_update_shaders(sctx);
if (sctx->vertex_buffers_dirty) {
--
2.1.0
More information about the mesa-dev
mailing list