anv: stop storing prog param data into shader blobs
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 22 Jan 2020 14:53:54 +0000 (16:53 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sat, 7 Mar 2020 05:51:45 +0000 (05:51 +0000)
We have no use for this data in Anv.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason EKstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3517>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3517>

src/intel/vulkan/anv_pipeline_cache.c
src/intel/vulkan/anv_private.h

index 02bc832ceeb63297421c602a1dde6d91eae3d6a2..4992bf2948f24acf821409a434848d32c1937583 100644 (file)
@@ -36,7 +36,7 @@ anv_shader_bin_create(struct anv_device *device,
                       const void *kernel_data, uint32_t kernel_size,
                       const void *constant_data, uint32_t constant_data_size,
                       const struct brw_stage_prog_data *prog_data_in,
-                      uint32_t prog_data_size, const void *prog_data_param_in,
+                      uint32_t prog_data_size,
                       const struct brw_compile_stats *stats, uint32_t num_stats,
                       const nir_xfb_info *xfb_info_in,
                       const struct anv_pipeline_bind_map *bind_map)
@@ -88,7 +88,7 @@ anv_shader_bin_create(struct anv_device *device,
    shader->constant_data_size = constant_data_size;
 
    memcpy(prog_data, prog_data_in, prog_data_size);
-   memcpy(prog_data_param, prog_data_param_in,
+   memset(prog_data_param, 0,
           prog_data->nr_params * sizeof(*prog_data_param));
    prog_data->param = prog_data_param;
    shader->prog_data = prog_data;
@@ -144,9 +144,6 @@ anv_shader_bin_write_to_blob(const struct anv_shader_bin *shader,
 
    blob_write_uint32(blob, shader->prog_data_size);
    blob_write_bytes(blob, shader->prog_data, shader->prog_data_size);
-   blob_write_bytes(blob, shader->prog_data->param,
-                    shader->prog_data->nr_params *
-                    sizeof(*shader->prog_data->param));
 
    blob_write_uint32(blob, shader->num_stats);
    blob_write_bytes(blob, shader->stats,
@@ -199,8 +196,6 @@ anv_shader_bin_create_from_blob(struct anv_device *device,
       blob_read_bytes(blob, prog_data_size);
    if (blob->overrun)
       return NULL;
-   const void *prog_data_param =
-      blob_read_bytes(blob, prog_data->nr_params * sizeof(*prog_data->param));
 
    uint32_t num_stats = blob_read_uint32(blob);
    const struct brw_compile_stats *stats =
@@ -232,7 +227,7 @@ anv_shader_bin_create_from_blob(struct anv_device *device,
                                 key_data, key_size,
                                 kernel_data, kernel_size,
                                 constant_data, constant_data_size,
-                                prog_data, prog_data_size, prog_data_param,
+                                prog_data, prog_data_size,
                                 stats, num_stats, xfb_info, &bind_map);
 }
 
@@ -383,7 +378,6 @@ anv_pipeline_cache_add_shader_locked(struct anv_pipeline_cache *cache,
                                      uint32_t constant_data_size,
                                      const struct brw_stage_prog_data *prog_data,
                                      uint32_t prog_data_size,
-                                     const void *prog_data_param,
                                      const struct brw_compile_stats *stats,
                                      uint32_t num_stats,
                                      const nir_xfb_info *xfb_info,
@@ -398,7 +392,7 @@ anv_pipeline_cache_add_shader_locked(struct anv_pipeline_cache *cache,
       anv_shader_bin_create(cache->device, key_data, key_size,
                             kernel_data, kernel_size,
                             constant_data, constant_data_size,
-                            prog_data, prog_data_size, prog_data_param,
+                            prog_data, prog_data_size,
                             stats, num_stats, xfb_info, bind_map);
    if (!bin)
       return NULL;
@@ -429,7 +423,6 @@ anv_pipeline_cache_upload_kernel(struct anv_pipeline_cache *cache,
                                               kernel_data, kernel_size,
                                               constant_data, constant_data_size,
                                               prog_data, prog_data_size,
-                                              prog_data->param,
                                               stats, num_stats,
                                               xfb_info, bind_map);
 
@@ -446,7 +439,6 @@ anv_pipeline_cache_upload_kernel(struct anv_pipeline_cache *cache,
                                    kernel_data, kernel_size,
                                    constant_data, constant_data_size,
                                    prog_data, prog_data_size,
-                                   prog_data->param,
                                    stats, num_stats,
                                    xfb_info, bind_map);
    }
@@ -707,7 +699,6 @@ anv_device_upload_kernel(struct anv_device *device,
                                   kernel_data, kernel_size,
                                   constant_data, constant_data_size,
                                   prog_data, prog_data_size,
-                                  prog_data->param,
                                   stats, num_stats,
                                   xfb_info, bind_map);
    }
index 0a13e066ffe49f42006eaf89b7dedd5660bf7095..13c2512e930ac37751696498ac3433b3e092c150 100644 (file)
@@ -3122,7 +3122,7 @@ anv_shader_bin_create(struct anv_device *device,
                       const void *kernel, uint32_t kernel_size,
                       const void *constant_data, uint32_t constant_data_size,
                       const struct brw_stage_prog_data *prog_data,
-                      uint32_t prog_data_size, const void *prog_data_param,
+                      uint32_t prog_data_size,
                       const struct brw_compile_stats *stats, uint32_t num_stats,
                       const struct nir_xfb_info *xfb_info,
                       const struct anv_pipeline_bind_map *bind_map);