mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 01:10:44 +02:00
zink: add a union to zink_gfx_pipeline_cache_entry for gpl
just code motion for now Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725>
This commit is contained in:
parent
a0df43f3ee
commit
8a397b7649
3 changed files with 16 additions and 12 deletions
|
|
@ -778,12 +778,12 @@ optimized_compile_job(void *data, void *gdata, int thread_index)
|
|||
struct zink_gfx_pipeline_cache_entry *pc_entry = data;
|
||||
struct zink_screen *screen = gdata;
|
||||
VkPipeline pipeline;
|
||||
if (pc_entry->gkey)
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, pc_entry->prog, pc_entry->ikey->pipeline, &pc_entry->gkey->pipeline, 1, pc_entry->okey->pipeline, true);
|
||||
if (pc_entry->gpl.gkey)
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, pc_entry->prog, pc_entry->gpl.ikey->pipeline, &pc_entry->gpl.gkey->pipeline, 1, pc_entry->gpl.okey->pipeline, true);
|
||||
else
|
||||
pipeline = zink_create_gfx_pipeline(screen, pc_entry->prog, pc_entry->prog->modules, &pc_entry->state, pc_entry->state.element_state->binding_map, zink_primitive_topology(pc_entry->state.gfx_prim_mode), true);
|
||||
if (pipeline) {
|
||||
pc_entry->unoptimized_pipeline = pc_entry->pipeline;
|
||||
pc_entry->gpl.unoptimized_pipeline = pc_entry->pipeline;
|
||||
pc_entry->pipeline = pipeline;
|
||||
}
|
||||
}
|
||||
|
|
@ -1488,7 +1488,7 @@ zink_destroy_gfx_program(struct zink_screen *screen,
|
|||
|
||||
util_queue_fence_wait(&pc_entry->fence);
|
||||
VKSCR(DestroyPipeline)(screen->dev, pc_entry->pipeline, NULL);
|
||||
VKSCR(DestroyPipeline)(screen->dev, pc_entry->unoptimized_pipeline, NULL);
|
||||
VKSCR(DestroyPipeline)(screen->dev, pc_entry->gpl.unoptimized_pipeline, NULL);
|
||||
free(pc_entry);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,9 +205,9 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
zink_find_or_create_output_ds3(ctx) :
|
||||
zink_find_or_create_output(ctx);
|
||||
/* partial pipelines are stored to the cache entry for async optimized pipeline compiles */
|
||||
pc_entry->ikey = ikey;
|
||||
pc_entry->gkey = gkey;
|
||||
pc_entry->okey = okey;
|
||||
pc_entry->gpl.ikey = ikey;
|
||||
pc_entry->gpl.gkey = gkey;
|
||||
pc_entry->gpl.okey = okey;
|
||||
/* create the non-optimized pipeline first using fast-linking to avoid stuttering */
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, &gkey->pipeline, 1, okey->pipeline, false);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1018,13 +1018,17 @@ struct zink_gfx_output_key {
|
|||
struct zink_gfx_pipeline_cache_entry {
|
||||
struct zink_gfx_pipeline_state state;
|
||||
VkPipeline pipeline;
|
||||
struct zink_gfx_program *prog;
|
||||
/* GPL only */
|
||||
struct util_queue_fence fence;
|
||||
struct zink_gfx_input_key *ikey;
|
||||
struct zink_gfx_library_key *gkey;
|
||||
struct zink_gfx_output_key *okey;
|
||||
struct zink_gfx_program *prog;
|
||||
VkPipeline unoptimized_pipeline;
|
||||
union {
|
||||
struct {
|
||||
struct zink_gfx_input_key *ikey;
|
||||
struct zink_gfx_library_key *gkey;
|
||||
struct zink_gfx_output_key *okey;
|
||||
VkPipeline unoptimized_pipeline;
|
||||
} gpl;
|
||||
};
|
||||
};
|
||||
|
||||
struct zink_gfx_lib_cache {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue