diff options
author | Ian Romanick <[email protected]> | 2016-08-30 17:49:24 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-10-04 16:53:31 -0700 |
commit | 5854de99b2735988f1fd7c08f367b4a8e58b270e (patch) | |
tree | 9fad096d319b67ecbf067143fca87a21e0f3fd6e /src/compiler/glsl/lower_ubo_reference.cpp | |
parent | c01f2bfc6c7abfbbb66b9d91a81b96518285ccf1 (diff) |
glsl: Track a unique intrinsic ID with each intrinsic function
text data bss dec hex filename
6037483 283160 28608 6349251 60e1c3 lib64/i965_dri.so before
6038043 283160 28608 6349811 60e3f3 lib64/i965_dri.so after
Signed-off-by: Ian Romanick <[email protected]>
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_ubo_reference.cpp')
-rw-r--r-- | src/compiler/glsl/lower_ubo_reference.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp index 1ed281c488a..0e6a02d868c 100644 --- a/src/compiler/glsl/lower_ubo_reference.cpp +++ b/src/compiler/glsl/lower_ubo_reference.cpp @@ -454,6 +454,7 @@ lower_ubo_reference_visitor::ssbo_store(void *mem_ctx, assert(sig); sig->replace_parameters(&sig_params); sig->is_intrinsic = true; + sig->intrinsic_id = ir_intrinsic_ssbo_store; ir_function *f = new(mem_ctx) ir_function("__intrinsic_store_ssbo"); f->add_signature(sig); @@ -491,6 +492,7 @@ lower_ubo_reference_visitor::ssbo_load(void *mem_ctx, assert(sig); sig->replace_parameters(&sig_params); sig->is_intrinsic = true; + sig->intrinsic_id = ir_intrinsic_ssbo_load; ir_function *f = new(mem_ctx) ir_function("__intrinsic_load_ssbo"); f->add_signature(sig); @@ -1018,6 +1020,10 @@ lower_ubo_reference_visitor::lower_ssbo_atomic_intrinsic(ir_call *ir) sig->replace_parameters(&sig_params); sig->is_intrinsic = true; + assert(ir->callee->intrinsic_id >= ir_intrinsic_generic_load); + assert(ir->callee->intrinsic_id <= ir_intrinsic_generic_atomic_comp_swap); + sig->intrinsic_id = MAP_INTRINSIC_TO_TYPE(ir->callee->intrinsic_id, ssbo); + char func_name[64]; sprintf(func_name, "%s_ssbo", ir->callee_name()); ir_function *f = new(mem_ctx) ir_function(func_name); |