summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_samplers.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-04-03 15:23:20 -0700
committerJason Ekstrand <[email protected]>2015-04-03 17:02:20 -0700
commit9c53e80b9b6a637a771328bac98d2292a00869ce (patch)
treec3483710eab039c5a3c731895eb99a5eef062b94 /src/glsl/nir/nir_lower_samplers.cpp
parent1bd1fc248ce5ecc6882309ab64ec61835fea1eda (diff)
nir/lower_samplers: Use the right memory context for realloc'ing tex sources
As of da5ec2a, we allocate instruction sources out of the instruction itself. When we realloc the texture sources we need to use the right memory context or ralloc will get angry and assert-fail Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_lower_samplers.cpp')
-rw-r--r--src/glsl/nir/nir_lower_samplers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_lower_samplers.cpp b/src/glsl/nir/nir_lower_samplers.cpp
index 3015dbd09e7..1e509a9019e 100644
--- a/src/glsl/nir/nir_lower_samplers.cpp
+++ b/src/glsl/nir/nir_lower_samplers.cpp
@@ -90,7 +90,7 @@ lower_sampler(nir_tex_instr *instr, struct gl_shader_program *shader_program,
ralloc_asprintf_append(&name, "[%u]", deref_array->base_offset);
break;
case nir_deref_array_type_indirect: {
- instr->src = reralloc(mem_ctx, instr->src, nir_tex_src,
+ instr->src = reralloc(instr, instr->src, nir_tex_src,
instr->num_srcs + 1);
memset(&instr->src[instr->num_srcs], 0, sizeof *instr->src);
instr->src[instr->num_srcs].src_type = nir_tex_src_sampler_offset;