diff options
author | Jason Ekstrand <[email protected]> | 2018-03-19 15:10:29 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-22 20:15:54 -0700 |
commit | 7f41a99cac036c7e104d78885a8200f15e5cd76f (patch) | |
tree | a5d21485c7ee472429ba4cbd715952e846f70107 /src/compiler | |
parent | d80c342d898275cbd6266c37e70dc422590d7d8c (diff) |
glsl/nir: Only claim to handle intrinsic functions
Non-intrinsic function handling has never actually been tested and
probably doesn't work. Just get rid of it for now. We can always add
it back in later if it's useful.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Acked-by: Rob Clark <[email protected]>
Acked-by: Bas Nieuwenhuizen <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index b10c1ff4eeb..d6be29ac5ce 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -617,14 +617,7 @@ nir_visitor::visit(ir_loop_jump *ir) void nir_visitor::visit(ir_return *ir) { - if (ir->value != NULL) { - nir_intrinsic_instr *copy = - nir_intrinsic_instr_create(this->shader, nir_intrinsic_copy_var); - - copy->variables[0] = nir_deref_var_create(copy, this->impl->return_var); - copy->variables[1] = evaluate_deref(©->instr, ir->value); - } - + assert(ir->value == NULL); nir_jump_instr *instr = nir_jump_instr_create(this->shader, nir_jump_return); nir_builder_instr_insert(&b, &instr->instr); } @@ -1246,21 +1239,7 @@ nir_visitor::visit(ir_call *ir) return; } - struct hash_entry *entry = - _mesa_hash_table_search(this->overload_table, ir->callee); - assert(entry); - nir_function *callee = (nir_function *) entry->data; - - nir_call_instr *instr = nir_call_instr_create(this->shader, callee); - - unsigned i = 0; - foreach_in_list(ir_dereference, param, &ir->actual_parameters) { - instr->params[i] = evaluate_deref(&instr->instr, param); - i++; - } - - instr->return_deref = evaluate_deref(&instr->instr, ir->return_deref); - nir_builder_instr_insert(&b, &instr->instr); + unreachable("glsl_to_nir only handles function calls to intrinsics"); } void |