aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-10-26 10:44:53 -0700
committerEric Anholt <eric@anholt.net>2020-11-11 08:49:49 -0800
commit4e9328e3b6a917c2a2b27630a25fbc44f822a6d0 (patch)
treeb9e7aa1dbecbc7fe61cb6b01050358b5ac1da642 /src/intel/compiler
parent1aa1c1aec2ab61e0fe0e7d32b371e85c96e3d6f4 (diff)
downloadexternal_mesa3d-4e9328e3b6a917c2a2b27630a25fbc44f822a6d0.tar.gz
external_mesa3d-4e9328e3b6a917c2a2b27630a25fbc44f822a6d0.tar.bz2
external_mesa3d-4e9328e3b6a917c2a2b27630a25fbc44f822a6d0.zip
nir_builder: Return a new builder from nir_builder_init_simple_shader().
It's a little inline function, so we can just RAII it for better ergonomics. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_nir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 8c45f762c13..b245a36b03c 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -1475,9 +1475,8 @@ brw_nir_create_passthrough_tcs(void *mem_ctx, const struct brw_compiler *compile
const nir_shader_compiler_options *options,
const struct brw_tcs_prog_key *key)
{
- nir_builder b;
- nir_builder_init_simple_shader(&b, mem_ctx, MESA_SHADER_TESS_CTRL,
- options);
+ nir_builder b = nir_builder_init_simple_shader(mem_ctx, MESA_SHADER_TESS_CTRL,
+ options);
nir_shader *nir = b.shader;
nir_variable *var;
nir_intrinsic_instr *load;