Skip to content
Snippets Groups Projects
Commit 96574ecb authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Dylan Baker
Browse files

zink: fix generated tcs update path


is_generated is in a union with the generated tcs pointer for tes shaders,
so check the shader stage too

cc: mesa-stable

Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Part-of: <mesa/mesa!17010>
(cherry picked from commit 338d9864)
parent 6d41869f
No related branches found
No related tags found
Loading
......@@ -1210,7 +1210,7 @@
"description": "zink: fix generated tcs update path",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},
......
......@@ -128,7 +128,7 @@ get_shader_module_for_stage(struct zink_context *ctx, struct zink_screen *screen
if (!zm) {
return NULL;
}
if (zs->is_generated && zs->spirv) {
if (pstage == PIPE_SHADER_TESS_CTRL && zs->is_generated && zs->spirv) {
assert(ctx); //TODO async
mod = zink_shader_tcs_compile(screen, zs, zink_get_tcs_key(ctx)->patch_vertices);
} else {
......@@ -155,7 +155,7 @@ get_shader_module_for_stage(struct zink_context *ctx, struct zink_screen *screen
zm->has_nonseamless = !!nonseamless_size;
if (inline_size)
memcpy(zm->key + key->size + nonseamless_size, key->base.inlined_uniform_values, inline_size * sizeof(uint32_t));
if (zs->is_generated)
if (pstage == PIPE_SHADER_TESS_CTRL && zs->is_generated)
zm->hash = zink_get_tcs_key(ctx)->patch_vertices;
else
zm->hash = shader_module_hash(zm);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment