mesa: replace shader_info::source_sha1
Replace shader_info::source_sha1 with shader_info::source_blake3 in compiler, mesa and radeonsi. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28156>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_builder.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "util/mesa-blake3.h"
|
||||
#include <math.h>
|
||||
|
||||
/** @file nir_opt_undef.c
|
||||
@@ -291,29 +291,29 @@ nir_opt_undef(nir_shader *shader)
|
||||
struct undef_options options = {0};
|
||||
|
||||
/* Disallow the undef->NaN transformation only for those shaders where
|
||||
* it's known to break rendering. These are shader source SHA1s printed by
|
||||
* it's known to break rendering. These are shader source BLAKE3s printed by
|
||||
* nir_print_shader().
|
||||
*/
|
||||
uint32_t shader_sha1s[][SHA1_DIGEST_LENGTH32] = {
|
||||
uint32_t shader_blake3s[][BLAKE3_OUT_LEN32] = {
|
||||
/* gputest/gimark */
|
||||
{0x9a1af9e2, 0x68f185bf, 0x11fc1257, 0x1102e80b, 0x5ca350fa},
|
||||
{0x582c214b, 0x25478275, 0xc9a835d2, 0x95c9b643, 0x69deae47, 0x213c7427, 0xa9da66a5, 0xac254ed2},
|
||||
|
||||
/* Viewperf13/CATIA_car_01 */
|
||||
{0x4746a4a4, 0xe3b27d27, 0xe6d2b0fb, 0xb7e9ceb3, 0x973e6152}, /* Taillights */
|
||||
{0xc49cc90d, 0xd7208212, 0x726502ea, 0xe1fe62c0, 0xb62fbd1f}, /* Grill */
|
||||
{0xde23f35b, 0xb6fa45ae, 0x96da7e6b, 0x5a6e4a60, 0xce0b6b31}, /* Headlights */
|
||||
{0xdf36242c, 0x0705db59, 0xf1ddac9b, 0xcd1c8466, 0x4c73203b}, /* Rims */
|
||||
{0x880dfa0f, 0x60e32201, 0xe3a89f59, 0xb1cc6f07, 0xcdbebe66, 0x20122aec, 0x83450d4e, 0x8f42843d}, /* Taillights */
|
||||
{0x624e53bb, 0x8eb635ba, 0xb1e4ed9b, 0x651b0fec, 0x86fcf79a, 0xde0863fb, 0x09ce80c1, 0xd972e40f}, /* Grill */
|
||||
{0x01a8db39, 0xfa175175, 0x621f7302, 0xfcde9177, 0x72d873bf, 0x048d38c1, 0xe669d2de, 0xaa6584af}, /* Headlights */
|
||||
{0x32029770, 0xab295b41, 0x3f1daf07, 0x9dd9153e, 0xd598be73, 0xe555b2f3, 0x6e087eaf, 0x084d329c}, /* Rims */
|
||||
|
||||
/* Viewperf13/CATIA_car_04 */
|
||||
{0x631da72a, 0xc971e849, 0xd6489a15, 0xf7c8dddb, 0xe8efd982}, /* Headlights */
|
||||
{0x85984b88, 0xd16b8fee, 0x0d49d97b, 0x5f6cc66e, 0xadcafad9}, /* Rims */
|
||||
{0xad023488, 0x09930735, 0xb0567e58, 0x336dce36, 0xe3c1e448}, /* Tires */
|
||||
{0xdcc4a549, 0x587873fa, 0xeed94361, 0x9a47cbff, 0x846d0167}, /* Windows */
|
||||
{0xfa0074a2, 0xef868430, 0x87935a0c, 0x19bc96be, 0xb5b95c74}, /* Body */
|
||||
{0x55207b90, 0x08fa2f8f, 0x9db62464, 0xadba6570, 0xb6d5d962, 0xf434bff5, 0x46a34d64, 0x021bfb45}, /* Headlights */
|
||||
{0x83fbdd6a, 0x231b027e, 0x6f142248, 0x2b3045de, 0xd2a4f460, 0x59dfb8d8, 0x6dbc00f9, 0xcca13143}, /* Rims */
|
||||
{0x88ed3a0a, 0xf128d384, 0x8161fdac, 0xd10cb257, 0x5e63db2d, 0x56798b6f, 0x881e81ee, 0xa4e937d4}, /* Tires */
|
||||
{0xbf84697c, 0x3bc75bb6, 0x9d012175, 0x2dd90bcf, 0x0562f0ed, 0x5aa80e62, 0xb5793ae3, 0x9127bcab}, /* Windows */
|
||||
{0x47a3eb4b, 0x136f676d, 0x94045ed3, 0x57b00972, 0x8cda7550, 0x88327fda, 0x37f7cf37, 0x66db05e3}, /* Body */
|
||||
};
|
||||
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(shader_sha1s); i++) {
|
||||
if (_mesa_printed_sha1_equal(shader->info.source_sha1, shader_sha1s[i])) {
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(shader_blake3s); i++) {
|
||||
if (_mesa_printed_blake3_equal(shader->info.source_blake3, shader_blake3s[i])) {
|
||||
options.disallow_undef_to_nan = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "compiler/shader_enums.h"
|
||||
#include "util/half_float.h"
|
||||
#include "util/memstream.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "util/mesa-blake3.h"
|
||||
#include "vulkan/vulkan_core.h"
|
||||
#include "nir.h"
|
||||
|
||||
@@ -2410,8 +2410,8 @@ print_shader_info(const struct shader_info *info, FILE *fp)
|
||||
{
|
||||
fprintf(fp, "shader: %s\n", gl_shader_stage_name(info->stage));
|
||||
|
||||
fprintf(fp, "source_sha1: {");
|
||||
_mesa_sha1_print(fp, info->source_sha1);
|
||||
fprintf(fp, "source_blake3: {");
|
||||
_mesa_blake3_print(fp, info->source_blake3);
|
||||
fprintf(fp, "}\n");
|
||||
|
||||
if (info->name)
|
||||
|
||||
Reference in New Issue
Block a user