From 20c09c9c068b7dff6705cf385eac203fd12b806a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 22 Jan 2020 16:53:54 +0200 Subject: [PATCH] anv: stop storing prog param data into shader blobs We have no use for this data in Anv. Signed-off-by: Lionel Landwerlin Reviewed-by: Jason EKstrand Tested-by: Marge Bot Part-of: --- src/intel/vulkan/anv_pipeline_cache.c | 17 ++++------------- 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); -- 2.30.2