mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
radeonsi: translate pipe_prim_type only when it changes
just sink it into the branch Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>
This commit is contained in:
parent
d0d4c4ba1d
commit
6f74105a34
1 changed files with 4 additions and 3 deletions
|
|
@ -781,7 +781,6 @@ static void si_emit_draw_registers(struct si_context *sctx, const struct pipe_dr
|
|||
unsigned min_vertex_count)
|
||||
{
|
||||
struct radeon_cmdbuf *cs = &sctx->gfx_cs;
|
||||
unsigned vgt_prim = si_conv_pipe_prim(prim);
|
||||
|
||||
if (GFX_VERSION >= GFX10)
|
||||
gfx10_emit_ge_cntl<GFX_VERSION, HAS_TESS, HAS_GS, NGG>(sctx, num_patches);
|
||||
|
|
@ -790,7 +789,9 @@ static void si_emit_draw_registers(struct si_context *sctx, const struct pipe_dr
|
|||
(sctx, indirect, prim, num_patches, instance_count, primitive_restart,
|
||||
min_vertex_count, info->vertices_per_patch);
|
||||
|
||||
if (vgt_prim != sctx->last_prim) {
|
||||
if (prim != sctx->last_prim) {
|
||||
unsigned vgt_prim = si_conv_pipe_prim(prim);
|
||||
|
||||
if (GFX_VERSION >= GFX10)
|
||||
radeon_set_uconfig_reg(cs, R_030908_VGT_PRIMITIVE_TYPE, vgt_prim);
|
||||
else if (GFX_VERSION >= GFX7)
|
||||
|
|
@ -798,7 +799,7 @@ static void si_emit_draw_registers(struct si_context *sctx, const struct pipe_dr
|
|||
else
|
||||
radeon_set_config_reg(cs, R_008958_VGT_PRIMITIVE_TYPE, vgt_prim);
|
||||
|
||||
sctx->last_prim = vgt_prim;
|
||||
sctx->last_prim = prim;
|
||||
}
|
||||
|
||||
/* Primitive restart. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue