mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
iris: fix crash when binding optional shader for the first time
This commit is contained in:
parent
6331b754df
commit
47d3019c4a
1 changed files with 3 additions and 1 deletions
|
|
@ -172,7 +172,9 @@ iris_bind_cached_shader(struct iris_context *ice,
|
|||
if (!shader)
|
||||
return false;
|
||||
|
||||
if (memcmp(shader, ice->shaders.prog[cache_id], sizeof(*shader)) != 0) {
|
||||
// XXX: why memcmp?
|
||||
if (!ice->shaders.prog[cache_id] ||
|
||||
memcmp(shader, ice->shaders.prog[cache_id], sizeof(*shader)) != 0) {
|
||||
ice->shaders.prog[cache_id] = shader;
|
||||
ice->state.dirty |= dirty_flag_for_cache(cache_id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue