diff options
author | Marek Olšák <marek.olsak@amd.com> | 2020-07-30 08:32:15 -0400 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2020-08-07 10:44:40 -0700 |
commit | ee4ccf003114e7200a693512c900aefc9bc4a2cf (patch) | |
tree | 42af699c6e9cd18605f03298e98820d82ac18434 | |
parent | 9c719ad7c90dff4f3af52fee0b97c60559d2713c (diff) |
radeonsi: remove the NGG hack decreasing LDS usage to deal with overflows
The LDS size can't overflow anymore, so we can use the correct max LDS size.
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
(cherry picked from commit e2e700f6053d0b16ba46e4d5c5b20e965fb2224e)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/gfx10_shader_ngg.c | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/.pick_status.json b/.pick_status.json index 601b5bd96bd..33b2d315036 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -22,7 +22,7 @@ "description": "radeonsi: remove the NGG hack decreasing LDS usage to deal with overflows", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "a23802bcb9a42a02d34a5a36d6e66d6532813a0d" }, diff --git a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c index b484ebae522..0654ab32855 100644 --- a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c +++ b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c @@ -1917,14 +1917,9 @@ bool gfx10_ngg_calculate_subgroup_info(struct si_shader *shader) const unsigned min_verts_per_prim = gs_type == PIPE_SHADER_GEOMETRY ? max_verts_per_prim : 1; /* All these are in dwords: */ - /* We can't allow using the whole LDS, because GS waves compete with - * other shader stages for LDS space. - * - * TODO: We should really take the shader's internal LDS use into - * account. The linker will fail if the size is greater than - * 8K dwords. + /* GE can only use 8K dwords (32KB) of LDS per workgroup. */ - const unsigned max_lds_size = 8 * 1024 - 768; + const unsigned max_lds_size = 8 * 1024 - gfx10_ngg_get_scratch_dw_size(shader); const unsigned target_lds_size = max_lds_size; unsigned esvert_lds_size = 0; unsigned gsprim_lds_size = 0; |