mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
anv/pipeline: Split setting up per-stage keys into its own loop
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
78f3dfb4a2
commit
651fbbf9b8
1 changed files with 8 additions and 3 deletions
|
|
@ -1135,6 +1135,14 @@ anv_pipeline_compile_graphics(struct anv_pipeline *pipeline,
|
|||
unsigned char sha1[20];
|
||||
anv_pipeline_hash_graphics(pipeline, layout, stages, sha1);
|
||||
|
||||
for (unsigned s = 0; s < MESA_SHADER_STAGES; s++) {
|
||||
if (!stages[s].entrypoint)
|
||||
continue;
|
||||
|
||||
stages[s].cache_key.stage = s;
|
||||
memcpy(stages[s].cache_key.sha1, sha1, sizeof(sha1));
|
||||
}
|
||||
|
||||
unsigned found = 0;
|
||||
unsigned cache_hits = 0;
|
||||
for (unsigned s = 0; s < MESA_SHADER_STAGES; s++) {
|
||||
|
|
@ -1143,9 +1151,6 @@ anv_pipeline_compile_graphics(struct anv_pipeline *pipeline,
|
|||
|
||||
int64_t stage_start = os_time_get_nano();
|
||||
|
||||
stages[s].cache_key.stage = s;
|
||||
memcpy(stages[s].cache_key.sha1, sha1, sizeof(sha1));
|
||||
|
||||
bool cache_hit;
|
||||
struct anv_shader_bin *bin =
|
||||
anv_device_search_for_kernel(pipeline->device, cache,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue