mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
Rename SHA1_* names to BLAKE3_*
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
This commit is contained in:
parent
e9ca8fccab
commit
0877be34f5
3 changed files with 49 additions and 49 deletions
|
|
@ -276,18 +276,18 @@ v3dv_descriptor_map_get_texture_shader_state(struct v3dv_device *device,
|
||||||
return reloc;
|
return reloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SHA1_UPDATE_VALUE(ctx, x) _mesa_blake3_update(ctx, &(x), sizeof(x));
|
#define BLAKE3_UPDATE_VALUE(ctx, x) _mesa_blake3_update(ctx, &(x), sizeof(x));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sha1_update_ycbcr_conversion(blake3_hasher *ctx,
|
sha1_update_ycbcr_conversion(blake3_hasher *ctx,
|
||||||
const struct vk_ycbcr_conversion_state *conversion)
|
const struct vk_ycbcr_conversion_state *conversion)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, conversion->format);
|
BLAKE3_UPDATE_VALUE(ctx, conversion->format);
|
||||||
SHA1_UPDATE_VALUE(ctx, conversion->ycbcr_model);
|
BLAKE3_UPDATE_VALUE(ctx, conversion->ycbcr_model);
|
||||||
SHA1_UPDATE_VALUE(ctx, conversion->ycbcr_range);
|
BLAKE3_UPDATE_VALUE(ctx, conversion->ycbcr_range);
|
||||||
SHA1_UPDATE_VALUE(ctx, conversion->mapping);
|
BLAKE3_UPDATE_VALUE(ctx, conversion->mapping);
|
||||||
SHA1_UPDATE_VALUE(ctx, conversion->chroma_offsets);
|
BLAKE3_UPDATE_VALUE(ctx, conversion->chroma_offsets);
|
||||||
SHA1_UPDATE_VALUE(ctx, conversion->chroma_reconstruction);
|
BLAKE3_UPDATE_VALUE(ctx, conversion->chroma_reconstruction);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -295,14 +295,14 @@ sha1_update_descriptor_set_binding_layout(blake3_hasher *ctx,
|
||||||
const struct v3dv_descriptor_set_binding_layout *layout,
|
const struct v3dv_descriptor_set_binding_layout *layout,
|
||||||
const struct v3dv_descriptor_set_layout *set_layout)
|
const struct v3dv_descriptor_set_layout *set_layout)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->type);
|
BLAKE3_UPDATE_VALUE(ctx, layout->type);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->array_size);
|
BLAKE3_UPDATE_VALUE(ctx, layout->array_size);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_index);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_index);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->dynamic_offset_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->dynamic_offset_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->dynamic_offset_index);
|
BLAKE3_UPDATE_VALUE(ctx, layout->dynamic_offset_index);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_offset);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_offset);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->immutable_samplers_offset);
|
BLAKE3_UPDATE_VALUE(ctx, layout->immutable_samplers_offset);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->plane_stride);
|
BLAKE3_UPDATE_VALUE(ctx, layout->plane_stride);
|
||||||
|
|
||||||
if (layout->immutable_samplers_offset) {
|
if (layout->immutable_samplers_offset) {
|
||||||
const struct v3dv_sampler *immutable_samplers =
|
const struct v3dv_sampler *immutable_samplers =
|
||||||
|
|
@ -320,11 +320,11 @@ static void
|
||||||
sha1_update_descriptor_set_layout(blake3_hasher *ctx,
|
sha1_update_descriptor_set_layout(blake3_hasher *ctx,
|
||||||
const struct v3dv_descriptor_set_layout *layout)
|
const struct v3dv_descriptor_set_layout *layout)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->flags);
|
BLAKE3_UPDATE_VALUE(ctx, layout->flags);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->binding_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->binding_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->shader_stages);
|
BLAKE3_UPDATE_VALUE(ctx, layout->shader_stages);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->dynamic_offset_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->dynamic_offset_count);
|
||||||
|
|
||||||
for (uint16_t i = 0; i < layout->binding_count; i++)
|
for (uint16_t i = 0; i < layout->binding_count; i++)
|
||||||
sha1_update_descriptor_set_binding_layout(ctx, &layout->binding[i], layout);
|
sha1_update_descriptor_set_binding_layout(ctx, &layout->binding[i], layout);
|
||||||
|
|
|
||||||
|
|
@ -451,15 +451,15 @@ tu_GetDescriptorSetLayoutBindingOffsetEXT(
|
||||||
|
|
||||||
/* Note: we must hash any values used in tu_lower_io(). */
|
/* Note: we must hash any values used in tu_lower_io(). */
|
||||||
|
|
||||||
#define SHA1_UPDATE_VALUE(ctx, x) _mesa_blake3_update(ctx, &(x), sizeof(x));
|
#define BLAKE3_UPDATE_VALUE(ctx, x) _mesa_blake3_update(ctx, &(x), sizeof(x));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sha1_update_ycbcr_sampler(blake3_hasher *ctx,
|
sha1_update_ycbcr_sampler(blake3_hasher *ctx,
|
||||||
const struct vk_ycbcr_conversion_state *sampler)
|
const struct vk_ycbcr_conversion_state *sampler)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, sampler->ycbcr_model);
|
BLAKE3_UPDATE_VALUE(ctx, sampler->ycbcr_model);
|
||||||
SHA1_UPDATE_VALUE(ctx, sampler->ycbcr_range);
|
BLAKE3_UPDATE_VALUE(ctx, sampler->ycbcr_range);
|
||||||
SHA1_UPDATE_VALUE(ctx, sampler->format);
|
BLAKE3_UPDATE_VALUE(ctx, sampler->format);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -467,12 +467,12 @@ sha1_update_descriptor_set_binding_layout(blake3_hasher *ctx,
|
||||||
const struct tu_descriptor_set_binding_layout *layout,
|
const struct tu_descriptor_set_binding_layout *layout,
|
||||||
const struct tu_descriptor_set_layout *set_layout)
|
const struct tu_descriptor_set_layout *set_layout)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->type);
|
BLAKE3_UPDATE_VALUE(ctx, layout->type);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->offset);
|
BLAKE3_UPDATE_VALUE(ctx, layout->offset);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->size);
|
BLAKE3_UPDATE_VALUE(ctx, layout->size);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->array_size);
|
BLAKE3_UPDATE_VALUE(ctx, layout->array_size);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->dynamic_offset_offset);
|
BLAKE3_UPDATE_VALUE(ctx, layout->dynamic_offset_offset);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->immutable_samplers_offset);
|
BLAKE3_UPDATE_VALUE(ctx, layout->immutable_samplers_offset);
|
||||||
|
|
||||||
const struct tu_sampler *samplers =
|
const struct tu_sampler *samplers =
|
||||||
tu_immutable_samplers(set_layout, layout);
|
tu_immutable_samplers(set_layout, layout);
|
||||||
|
|
@ -488,9 +488,9 @@ sha1_update_descriptor_set_binding_layout(blake3_hasher *ctx,
|
||||||
if (samplers) {
|
if (samplers) {
|
||||||
for (unsigned i = 0; i < layout->array_size; i++) {
|
for (unsigned i = 0; i < layout->array_size; i++) {
|
||||||
if (samplers[i].vk.flags & VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT) {
|
if (samplers[i].vk.flags & VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT) {
|
||||||
SHA1_UPDATE_VALUE(ctx, i);
|
BLAKE3_UPDATE_VALUE(ctx, i);
|
||||||
SHA1_UPDATE_VALUE(ctx, samplers[i].vk.address_mode_u);
|
BLAKE3_UPDATE_VALUE(ctx, samplers[i].vk.address_mode_u);
|
||||||
SHA1_UPDATE_VALUE(ctx, samplers[i].vk.address_mode_v);
|
BLAKE3_UPDATE_VALUE(ctx, samplers[i].vk.address_mode_v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -501,7 +501,7 @@ static void
|
||||||
sha1_update_descriptor_set_layout(blake3_hasher *ctx,
|
sha1_update_descriptor_set_layout(blake3_hasher *ctx,
|
||||||
const struct tu_descriptor_set_layout *layout)
|
const struct tu_descriptor_set_layout *layout)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->has_variable_descriptors);
|
BLAKE3_UPDATE_VALUE(ctx, layout->has_variable_descriptors);
|
||||||
|
|
||||||
for (uint16_t i = 0; i < layout->binding_count; i++)
|
for (uint16_t i = 0; i < layout->binding_count; i++)
|
||||||
sha1_update_descriptor_set_binding_layout(ctx, &layout->binding[i],
|
sha1_update_descriptor_set_binding_layout(ctx, &layout->binding[i],
|
||||||
|
|
|
||||||
|
|
@ -698,7 +698,7 @@ void anv_DestroyDescriptorSetLayout(
|
||||||
anv_descriptor_set_layout_unref(device, set_layout);
|
anv_descriptor_set_layout_unref(device, set_layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SHA1_UPDATE_VALUE(ctx, x) _mesa_blake3_update(ctx, &(x), sizeof(x));
|
#define BLAKE3_UPDATE_VALUE(ctx, x) _mesa_blake3_update(ctx, &(x), sizeof(x));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sha1_update_immutable_sampler(blake3_hasher *ctx,
|
sha1_update_immutable_sampler(blake3_hasher *ctx,
|
||||||
|
|
@ -716,14 +716,14 @@ static void
|
||||||
sha1_update_descriptor_set_binding_layout(blake3_hasher *ctx,
|
sha1_update_descriptor_set_binding_layout(blake3_hasher *ctx,
|
||||||
const struct anv_descriptor_set_binding_layout *layout)
|
const struct anv_descriptor_set_binding_layout *layout)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->flags);
|
BLAKE3_UPDATE_VALUE(ctx, layout->flags);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->data);
|
BLAKE3_UPDATE_VALUE(ctx, layout->data);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->max_plane_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->max_plane_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->array_size);
|
BLAKE3_UPDATE_VALUE(ctx, layout->array_size);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_index);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_index);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->dynamic_offset_index);
|
BLAKE3_UPDATE_VALUE(ctx, layout->dynamic_offset_index);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->buffer_view_index);
|
BLAKE3_UPDATE_VALUE(ctx, layout->buffer_view_index);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_offset);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_offset);
|
||||||
|
|
||||||
if (layout->immutable_samplers) {
|
if (layout->immutable_samplers) {
|
||||||
for (uint16_t i = 0; i < layout->array_size; i++)
|
for (uint16_t i = 0; i < layout->array_size; i++)
|
||||||
|
|
@ -735,12 +735,12 @@ static void
|
||||||
sha1_update_descriptor_set_layout(blake3_hasher *ctx,
|
sha1_update_descriptor_set_layout(blake3_hasher *ctx,
|
||||||
const struct anv_descriptor_set_layout *layout)
|
const struct anv_descriptor_set_layout *layout)
|
||||||
{
|
{
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->binding_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->binding_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->shader_stages);
|
BLAKE3_UPDATE_VALUE(ctx, layout->shader_stages);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->buffer_view_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->buffer_view_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->dynamic_offset_count);
|
BLAKE3_UPDATE_VALUE(ctx, layout->dynamic_offset_count);
|
||||||
SHA1_UPDATE_VALUE(ctx, layout->descriptor_buffer_size);
|
BLAKE3_UPDATE_VALUE(ctx, layout->descriptor_buffer_size);
|
||||||
|
|
||||||
for (uint16_t i = 0; i < layout->binding_count; i++)
|
for (uint16_t i = 0; i < layout->binding_count; i++)
|
||||||
sha1_update_descriptor_set_binding_layout(ctx, &layout->binding[i]);
|
sha1_update_descriptor_set_binding_layout(ctx, &layout->binding[i]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue