From cbfe31ccbe3eafcb5aeb74457e3b67641fd54ae1 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 19 Mar 2019 10:18:49 -0500 Subject: Revert "nir: const `nir_call_instr::callee`" This reverts commit db57db5317e81fb4ce31bc294fdcc199db651542. When building IR, nothing is really immutable and, since C has no concept of constness propagating beyond the first pointer, we have to be vary careful with how we use it. To just throw const into a function like this is a lie. Instead, we should just drop the unneeded const in spirv_to_nir which this commit does along with the revert. --- src/compiler/spirv/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/spirv') diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 0ef8d67519a..6d6aed287ac 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -4492,7 +4492,7 @@ vtn_create_builder(const uint32_t *words, size_t word_count, static nir_function * vtn_emit_kernel_entry_point_wrapper(struct vtn_builder *b, - const nir_function *entry_point) + nir_function *entry_point) { vtn_assert(entry_point == b->entry_point->func->impl->function); vtn_fail_if(!entry_point->name, "entry points are required to have a name"); -- cgit v1.2.3