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;
}
}
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);
}
}
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 {
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 {