diff options
author | Lionel Landwerlin <[email protected]> | 2020-01-22 16:53:54 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-07 05:51:45 +0000 |
commit | 20c09c9c068b7dff6705cf385eac203fd12b806a (patch) | |
tree | 188e7f52b38225acca8e76cccb6b2b1ad6c4f194 /src/intel | |
parent | e03f9652801ad7f70091e084535a3fb6650c3acd (diff) |
anv: stop storing prog param data into shader blobs
We have no use for this data in Anv.
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jason EKstrand <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3517>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3517>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_pipeline_cache.c | 17 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 2 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 02bc832ceeb..4992bf2948f 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -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); } diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 0a13e066ffe..13c2512e930 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -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); |