mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
radeonsi: fix variable_shared_size assert in si_switch_compute_shader
shader->selector->stage is always set to COMPUTE even for OpenCL. Remove
the assert as it doesn't really protect against anything and patch the
shared size only when variable_shared_size is set.
Fixes: e478410466 ("radeonsi: inline shader_info in si_shader_info, keep only what's used")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35003>
This commit is contained in:
parent
0e57c236c4
commit
41a18a27b0
1 changed files with 1 additions and 3 deletions
|
|
@ -334,11 +334,9 @@ static bool si_switch_compute_shader(struct si_context *sctx, struct si_compute
|
|||
struct radeon_cmdbuf *cs = &sctx->gfx_cs;
|
||||
const struct ac_shader_config *config = &shader->config;
|
||||
unsigned rsrc2;
|
||||
unsigned stage = shader->selector->stage;
|
||||
|
||||
*prefetch = false;
|
||||
|
||||
assert(variable_shared_size == 0 || stage == MESA_SHADER_KERNEL);
|
||||
if (sctx->cs_shader_state.emitted_program == program &&
|
||||
sctx->cs_shader_state.variable_shared_size == variable_shared_size)
|
||||
return true;
|
||||
|
|
@ -347,7 +345,7 @@ static bool si_switch_compute_shader(struct si_context *sctx, struct si_compute
|
|||
rsrc2 = config->rsrc2;
|
||||
|
||||
/* only do this for OpenCL */
|
||||
if (stage == MESA_SHADER_KERNEL) {
|
||||
if (variable_shared_size) {
|
||||
unsigned shared_size = program->sel.info.base.shared_size + variable_shared_size;
|
||||
unsigned lds_blocks = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue