diff options
author | Marek Olšák <[email protected]> | 2019-05-21 19:17:34 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-06-19 20:30:32 -0400 |
commit | b64bd5887ee508c5db2aa5636f955974ce0b0ed2 (patch) | |
tree | a3b72492fed2b4e730e33cbd45ae606db70efadf /src/amd | |
parent | 1ee0f0d315546766c584f7af3ca1974d18e8f3e4 (diff) |
ac/rtld: check correct LDS max size
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_rtld.c | 8 | ||||
-rw-r--r-- | src/amd/common/ac_rtld.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/amd/common/ac_rtld.c b/src/amd/common/ac_rtld.c index c750dbfa9cb..18f198f8af2 100644 --- a/src/amd/common/ac_rtld.c +++ b/src/amd/common/ac_rtld.c @@ -280,7 +280,13 @@ bool ac_rtld_open(struct ac_rtld_binary *binary, util_dynarray_foreach(&binary->lds_symbols, struct ac_rtld_symbol, symbol) symbol->part_idx = ~0u; - unsigned max_lds_size = i.info->chip_class >= GFX7 ? 64 * 1024 : 32 * 1024; + unsigned max_lds_size = 64 * 1024; + + if (i.info->chip_class == GFX6 || + (i.shader_type != MESA_SHADER_COMPUTE && + i.shader_type != MESA_SHADER_FRAGMENT)) + max_lds_size = 32 * 1024; + uint64_t shared_lds_size = 0; if (!layout_symbols(binary->lds_symbols.data, i.num_shared_lds_symbols, &shared_lds_size)) goto fail; diff --git a/src/amd/common/ac_rtld.h b/src/amd/common/ac_rtld.h index b13270b181d..3f60444f85e 100644 --- a/src/amd/common/ac_rtld.h +++ b/src/amd/common/ac_rtld.h @@ -29,6 +29,7 @@ #include <stddef.h> #include "util/u_dynarray.h" +#include "compiler/shader_enums.h" struct ac_rtld_part; struct ac_shader_config; @@ -84,6 +85,7 @@ typedef bool (*ac_rtld_get_external_symbol_cb)( struct ac_rtld_open_info { const struct radeon_info *info; struct ac_rtld_options options; + gl_shader_stage shader_type; unsigned num_parts; const char * const *elf_ptrs; /* in-memory ELF objects of each part */ |