mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
radeonsi: handle NO_OPT_VARIANT in si_shader_select_with_key
so as not to change the keys in si_context Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>
This commit is contained in:
parent
03b5a94258
commit
0b1fd84950
1 changed files with 6 additions and 3 deletions
|
|
@ -2086,9 +2086,6 @@ static inline void si_shader_selector_key(struct pipe_context *ctx, struct si_sh
|
|||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
if (unlikely(sctx->screen->debug_flags & DBG(NO_OPT_VARIANT)))
|
||||
memset(&key->opt, 0, sizeof(key->opt));
|
||||
}
|
||||
|
||||
static void si_build_shader_variant(struct si_shader *shader, int thread_index, bool low_priority)
|
||||
|
|
@ -2209,6 +2206,12 @@ int si_shader_select_with_key(struct si_screen *sscreen, struct si_shader_ctx_st
|
|||
*/
|
||||
struct si_shader_key local_key;
|
||||
|
||||
if (unlikely(sscreen->debug_flags & DBG(NO_OPT_VARIANT))) {
|
||||
/* Disable shader variant optimizations. */
|
||||
key = use_local_key_copy(key, &local_key);
|
||||
memset(&local_key.opt, 0, sizeof(key->opt));
|
||||
}
|
||||
|
||||
again:
|
||||
/* Check if we don't need to change anything.
|
||||
* This path is also used for most shaders that don't need multiple
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue