summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_io.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-09 13:18:29 -0700
committerEmil Velikov <[email protected]>2015-09-23 20:48:26 +0100
commitd9b54a01bee82796249a59127af02d00ce6aa032 (patch)
treefcd890dbce98a6a6226c270851f9a572c88d5c0c /src/glsl/nir/nir_lower_io.c
parentc4bae5792bb5515da42e23f166f5ba5d68f79615 (diff)
nir: Fix a bunch of ralloc parenting errors
As of a10d4937, we would really like things associated with an instruction to be allocated out of that instruction and not out of the shader. In particular, you should be passing the instruction that will ultimately be holding the source into nir_src_copy rather than an arbitrary memory context. We also change the prototypes of nir_dest_copy and nir_alu_src/dest_copy to explicitly take an instruction so we catch this earlier in the future. Cc: "11.0" <[email protected]> Reviewed-by: Thomas Helland <[email protected]> (cherry picked from commit 8c8fc5f8336c8c79e5890265ae6c03271aa94075)
Diffstat (limited to 'src/glsl/nir/nir_lower_io.c')
-rw-r--r--src/glsl/nir/nir_lower_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c
index d33aefec6e5..4c3c67ceeb9 100644
--- a/src/glsl/nir/nir_lower_io.c
+++ b/src/glsl/nir/nir_lower_io.c
@@ -376,7 +376,7 @@ nir_lower_io_block(nir_block *block, void *void_state)
store->const_index[0] = offset;
- nir_src_copy(&store->src[0], &intrin->src[0], state->mem_ctx);
+ nir_src_copy(&store->src[0], &intrin->src[0], store);
if (has_indirect)
store->src[1] = indirect;