zink: store the default variant hash for a program
the first created pipeline with a program is the default variants, and this is likely to be the most common, so we can store the hash to avoid needing to recalc it later Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11740>
This commit is contained in:
parent
02287fe42d
commit
997e5cf440
|
@ -447,6 +447,7 @@ zink_create_gfx_program(struct zink_context *ctx,
|
|||
assign_io(prog, prog->shaders);
|
||||
|
||||
update_shader_modules(ctx, prog->shaders, prog, false);
|
||||
prog->default_variant_hash = ctx->gfx_pipeline_state.module_hash;
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(prog->pipelines); ++i) {
|
||||
prog->pipelines[i] = _mesa_hash_table_create(NULL,
|
||||
|
|
|
@ -101,6 +101,7 @@ struct zink_gfx_program {
|
|||
|
||||
struct zink_shader *shaders[ZINK_SHADER_COUNT];
|
||||
struct hash_table *pipelines[11]; // number of draw modes we support
|
||||
uint32_t default_variant_hash;
|
||||
};
|
||||
|
||||
struct zink_compute_program {
|
||||
|
|
Loading…
Reference in New Issue