summaryrefslogtreecommitdiff
path: root/src/amd/vulkan/radv_meta_buffer.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-10-26 11:37:25 -0700
committerEric Anholt <eric@anholt.net>2020-11-11 08:50:29 -0800
commiteda3e4e055e240a14c6ad4bdbde544c6348fc01d (patch)
tree69374ef72842676d00c9d94f44ee7dae36e4cfd9 /src/amd/vulkan/radv_meta_buffer.c
parent5f992802f5130352e903218cf3541e429b87cae2 (diff)
nir/builder: Add a name format arg to nir_builder_init_simple_shader().
This cleans up a bunch of gross sprintfs and keeps the caller from needing to remember to ralloc_strdup. I added a couple of '"%s", name ? name : ""' to radv where I didn't fully trace through whether a non-null name was being passed in. I also took the liberty of adding a basic name to a few shaders (pan_blit, unit tests) Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
Diffstat (limited to 'src/amd/vulkan/radv_meta_buffer.c')
-rw-r--r--src/amd/vulkan/radv_meta_buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index 96329373f5c..51362336651 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -7,8 +7,8 @@
static nir_shader *
build_buffer_fill_shader(struct radv_device *dev)
{
- nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_COMPUTE, NULL);
- b.shader->info.name = ralloc_strdup(b.shader, "meta_buffer_fill");
+ nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_COMPUTE, NULL,
+ "meta_buffer_fill");
b.shader->info.cs.local_size[0] = 64;
b.shader->info.cs.local_size[1] = 1;
b.shader->info.cs.local_size[2] = 1;
@@ -53,8 +53,8 @@ build_buffer_fill_shader(struct radv_device *dev)
static nir_shader *
build_buffer_copy_shader(struct radv_device *dev)
{
- nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_COMPUTE, NULL);
- b.shader->info.name = ralloc_strdup(b.shader, "meta_buffer_copy");
+ nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_COMPUTE, NULL,
+ "meta_buffer_copy");
b.shader->info.cs.local_size[0] = 64;
b.shader->info.cs.local_size[1] = 1;
b.shader->info.cs.local_size[2] = 1;