const int rp_idx = state->render_pass ? 1 : 0;
if (DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT || DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT2) {
if (prog->last_finalized_hash[rp_idx][idx] == state->final_hash && !prog->inline_variants && likely(prog->last_pipeline[rp_idx][idx])) {
- state->pipeline = prog->last_pipeline[rp_idx][idx];
+ state->pipeline = prog->last_pipeline[rp_idx][idx]->pipeline;
return state->pipeline;
}
}
state->pipeline = cache_entry->pipeline;
if (DYNAMIC_STATE >= ZINK_DYNAMIC_VERTEX_INPUT) {
prog->last_finalized_hash[rp_idx][idx] = state->final_hash;
- prog->last_pipeline[rp_idx][idx] = state->pipeline;
+ prog->last_pipeline[rp_idx][idx] = cache_entry;
}
return state->pipeline;
}
uint8_t inline_variants; //which stages are using inlined uniforms
uint32_t last_finalized_hash[2][4]; //[dynamic, renderpass][primtype idx]
- VkPipeline last_pipeline[2][4]; //[dynamic, renderpass][primtype idx]
+ struct zink_gfx_pipeline_cache_entry *last_pipeline[2][4]; //[dynamic, renderpass][primtype idx]
struct set libs; //zink_gfx_library_key -> VkPipeline
};