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>
This commit is contained in:
@@ -57,7 +57,8 @@ protected:
|
||||
glsl_type_singleton_init_or_ref();
|
||||
|
||||
static const nir_shader_compiler_options options = { };
|
||||
bld = nir_builder_init_simple_shader(MESA_SHADER_VERTEX, &options);
|
||||
bld = nir_builder_init_simple_shader(MESA_SHADER_VERTEX, &options,
|
||||
"negative equal tests");
|
||||
memset(c1, 0, sizeof(c1));
|
||||
memset(c2, 0, sizeof(c2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user