radeonsi/gfx11: clamp PRIM_GRP_SIZE
Legal range of values is [1, 256]. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
This commit is contained in:

committed by
Marge Bot

parent
f2ef663d08
commit
014a0bf0b6
@@ -33,6 +33,7 @@
|
||||
#include "util/hash_table.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "util/u_async_debug.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_prim.h"
|
||||
#include "tgsi/tgsi_from_mesa.h"
|
||||
@@ -1527,7 +1528,9 @@ static void gfx10_shader_ngg(struct si_screen *sscreen, struct si_shader *shader
|
||||
shader->ge_cntl = S_03096C_PRIMS_PER_SUBGRP(shader->ngg.max_gsprims) |
|
||||
S_03096C_VERTS_PER_SUBGRP(shader->ngg.hw_max_esverts) |
|
||||
S_03096C_BREAK_PRIMGRP_AT_EOI(break_wave_at_eoi) |
|
||||
S_03096C_PRIM_GRP_SIZE_GFX11(252 / MAX2(shader->ngg.prim_amp_factor, 1));
|
||||
S_03096C_PRIM_GRP_SIZE_GFX11(
|
||||
CLAMP(252 / MAX2(shader->ngg.prim_amp_factor, 1),
|
||||
1, 256));
|
||||
} else {
|
||||
shader->ge_cntl = S_03096C_PRIM_GRP_SIZE_GFX10(shader->ngg.max_gsprims) |
|
||||
S_03096C_VERT_GRP_SIZE(shader->ngg.hw_max_esverts) |
|
||||
|
Reference in New Issue
Block a user