aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c13
-rw-r--r--src/intel/vulkan/anv_pipeline_cache.c18
2 files changed, 16 insertions, 15 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 175efdbcb91..56a08ce76ae 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -259,18 +259,19 @@ VkResult anv_CreatePipelineLayout(
}
}
- struct mesa_sha1 *ctx = _mesa_sha1_init();
+ struct mesa_sha1 ctx;
+ _mesa_sha1_init(&ctx);
for (unsigned s = 0; s < layout->num_sets; s++) {
- sha1_update_descriptor_set_layout(ctx, layout->set[s].layout);
- _mesa_sha1_update(ctx, &layout->set[s].dynamic_offset_start,
+ sha1_update_descriptor_set_layout(&ctx, layout->set[s].layout);
+ _mesa_sha1_update(&ctx, &layout->set[s].dynamic_offset_start,
sizeof(layout->set[s].dynamic_offset_start));
}
- _mesa_sha1_update(ctx, &layout->num_sets, sizeof(layout->num_sets));
+ _mesa_sha1_update(&ctx, &layout->num_sets, sizeof(layout->num_sets));
for (unsigned s = 0; s < MESA_SHADER_STAGES; s++) {
- _mesa_sha1_update(ctx, &layout->stage[s].has_dynamic_offsets,
+ _mesa_sha1_update(&ctx, &layout->stage[s].has_dynamic_offsets,
sizeof(layout->stage[s].has_dynamic_offsets));
}
- _mesa_sha1_final(ctx, layout->sha1);
+ _mesa_sha1_final(&ctx, layout->sha1);
*pPipelineLayout = anv_pipeline_layout_to_handle(layout);
diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c
index a8ea80f51f5..0b677a49f3d 100644
--- a/src/intel/vulkan/anv_pipeline_cache.c
+++ b/src/intel/vulkan/anv_pipeline_cache.c
@@ -205,23 +205,23 @@ anv_hash_shader(unsigned char *hash, const void *key, size_t key_size,
const struct anv_pipeline_layout *pipeline_layout,
const VkSpecializationInfo *spec_info)
{
- struct mesa_sha1 *ctx;
+ struct mesa_sha1 ctx;
- ctx = _mesa_sha1_init();
- _mesa_sha1_update(ctx, key, key_size);
- _mesa_sha1_update(ctx, module->sha1, sizeof(module->sha1));
- _mesa_sha1_update(ctx, entrypoint, strlen(entrypoint));
+ _mesa_sha1_init(&ctx);
+ _mesa_sha1_update(&ctx, key, key_size);
+ _mesa_sha1_update(&ctx, module->sha1, sizeof(module->sha1));
+ _mesa_sha1_update(&ctx, entrypoint, strlen(entrypoint));
if (pipeline_layout) {
- _mesa_sha1_update(ctx, pipeline_layout->sha1,
+ _mesa_sha1_update(&ctx, pipeline_layout->sha1,
sizeof(pipeline_layout->sha1));
}
/* hash in shader stage, pipeline layout? */
if (spec_info) {
- _mesa_sha1_update(ctx, spec_info->pMapEntries,
+ _mesa_sha1_update(&ctx, spec_info->pMapEntries,
spec_info->mapEntryCount * sizeof spec_info->pMapEntries[0]);
- _mesa_sha1_update(ctx, spec_info->pData, spec_info->dataSize);
+ _mesa_sha1_update(&ctx, spec_info->pData, spec_info->dataSize);
}
- _mesa_sha1_final(ctx, hash);
+ _mesa_sha1_final(&ctx, hash);
}
static struct anv_shader_bin *