zink: verify program key sizes before checking for default variant
currently keys for shaders are always the same size, but this will change in the future, at which point the keysize becomes relevant Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12547>
This commit is contained in:
committed by
Marge Bot
parent
4a3395f35a
commit
325fbc3fd2
@@ -208,7 +208,7 @@ get_shader_module_for_stage(struct zink_context *ctx, struct zink_shader *zs, st
|
||||
/* if comparing against the existing default, use the base variant key size since
|
||||
* we're only checking the stage-specific data
|
||||
*/
|
||||
key.is_default_variant = !memcmp(tmp->data, &key, key.size);
|
||||
key.is_default_variant = tmp->size == key.size && !memcmp(tmp->data, &key, key.size);
|
||||
} else
|
||||
key.is_default_variant = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user