diff options
author | Daniel Schürmann <daniel@schuermann.dev> | 2023-03-31 16:08:59 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-04-11 11:38:15 +0000 |
commit | efbf0e70ebaf2f9ce334e566c18080d7ac6f4f81 (patch) | |
tree | bd2086b1c7aa03259e594ddd2f312345fc8c8f8d | |
parent | 5303a57964f184abce9acfd168a4a044d2c93616 (diff) | |
download | mesa-efbf0e70ebaf2f9ce334e566c18080d7ac6f4f81.tar.gz |
radv: unconditionally store the binary code in radv_shader
We will (temporarily) use it to serialize shader binaries
with the common vk_pipeline_cache.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 10 | ||||
-rw-r--r-- | src/amd/vulkan/radv_shader.h | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index a6d0d5b550f..a75070f3e5d 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -1696,12 +1696,10 @@ static bool radv_shader_binary_upload(struct radv_device *device, const struct radv_shader_binary *binary, struct radv_shader *shader, void *dest_ptr) { - if (device->thread_trace.bo) { - shader->code = calloc(shader->code_size, 1); - if (!shader->code) { - radv_shader_unref(device, shader); - return false; - } + shader->code = calloc(shader->code_size, 1); + if (!shader->code) { + radv_shader_unref(device, shader); + return false; } if (binary->type == RADV_BINARY_TYPE_RTLD) { diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 3f4110543cf..1b5b2e92d3a 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -517,8 +517,6 @@ struct radv_shader { struct radv_shader_info info; uint8_t sha1[SHA1_DIGEST_LENGTH]; - - /* sqtt only */ void *code; /* debug only */ |