mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
radeonsi: fix max scrach lds size calculation when ngg
Fixes:028d0590f8("radeonsi: replace llvm ngg vs/tes with nir lowering") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22304> (cherry picked from commitfc3d8e1125) Conflicts: src/gallium/drivers/radeonsi/gfx10_shader_ngg.c
This commit is contained in:
parent
8405693c33
commit
1d2c0192cf
2 changed files with 5 additions and 5 deletions
|
|
@ -5924,7 +5924,7 @@
|
|||
"description": "radeonsi: fix max scrach lds size calculation when ngg",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "028d0590f85c418cf470510cafcbe8026c2c4208",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -163,10 +163,10 @@ bool gfx10_ngg_calculate_subgroup_info(struct si_shader *shader)
|
|||
const unsigned max_verts_per_prim = u_vertices_per_prim(input_prim);
|
||||
const unsigned min_verts_per_prim = gs_stage == MESA_SHADER_GEOMETRY ? max_verts_per_prim : 1;
|
||||
|
||||
/* All these are in dwords: */
|
||||
/* GE can only use 8K dwords (32KB) of LDS per workgroup.
|
||||
*/
|
||||
const unsigned max_lds_size = 8 * 1024 - gfx10_ngg_get_scratch_dw_size(shader);
|
||||
/* All these are in dwords. The maximum is 16K dwords (64KB) of LDS per workgroup. */
|
||||
const unsigned scratch_lds_size = gfx10_ngg_get_scratch_dw_size(shader);
|
||||
/* Scrach is at last of LDS space and 2 dwords aligned, so it may cost more for alignment. */
|
||||
const unsigned max_lds_size = 16 * 1024 - ALIGN(scratch_lds_size, 2);
|
||||
const unsigned target_lds_size = max_lds_size;
|
||||
unsigned esvert_lds_size = 0;
|
||||
unsigned gsprim_lds_size = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue