radv: unconditionally store the binary code in radv_shader
authorDaniel Schürmann <daniel@schuermann.dev>
Fri, 31 Mar 2023 14:08:59 +0000 (16:08 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Apr 2023 11:38:15 +0000 (11:38 +0000)
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>

src/amd/vulkan/radv_shader.c
src/amd/vulkan/radv_shader.h

index a6d0d5b..a75070f 100644 (file)
@@ -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) {
index 3f41105..1b5b2e9 100644 (file)
@@ -517,8 +517,6 @@ struct radv_shader {
    struct radv_shader_info info;
 
    uint8_t sha1[SHA1_DIGEST_LENGTH];
-
-   /* sqtt only */
    void *code;
 
    /* debug only */