[Mesa-dev] [PATCH 03/11] radeonsi: deduce rast_prim correctly for tessellation point mode
Nicolai Hähnle
nhaehnle at gmail.com
Fri Sep 29 11:01:30 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
Together with the previous patches, this fixes
dEQP-GLES31.functional.primitive_bounding_box.wide_points.*
Cc: mesa-stable at lists.freedesktop.org
---
src/gallium/drivers/radeonsi/si_state_draw.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index fb91d936c96..42807c03091 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -1242,23 +1242,26 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
si_decompress_graphics_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.cso)
rast_prim = sctx->gs_shader.cso->gs_output_prim;
- else if (sctx->tes_shader.cso)
- rast_prim = sctx->tes_shader.cso->info.properties[TGSI_PROPERTY_TES_PRIM_MODE];
- else
+ else if (sctx->tes_shader.cso) {
+ if (sctx->tes_shader.cso->info.properties[TGSI_PROPERTY_TES_POINT_MODE])
+ rast_prim = PIPE_PRIM_POINTS;
+ else
+ rast_prim = sctx->tes_shader.cso->info.properties[TGSI_PROPERTY_TES_PRIM_MODE];
+ } else
rast_prim = info->mode;
if (rast_prim != sctx->b.current_rast_prim) {
bool old_is_poly = sctx->b.current_rast_prim >= PIPE_PRIM_TRIANGLES;
bool new_is_poly = rast_prim >= PIPE_PRIM_TRIANGLES;
if (old_is_poly != new_is_poly) {
sctx->b.scissors.dirty_mask = (1 << R600_MAX_VIEWPORTS) - 1;
si_set_atom_dirty(sctx, &sctx->b.scissors.atom, true);
}
--
2.11.0
More information about the mesa-dev
mailing list