summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2016-08-31 18:42:34 -0700
committerIan Romanick <ian.d.romanick@intel.com>2016-10-04 16:53:31 -0700
commitbb290b5679745e3b7f84dd14174aae6688ab4cac (patch)
tree12893efd4085b812e90900cadaaf08467e7795b7 /src
parentacfcc7bbfac132b0c362819d7c734ef80cae289e (diff)
downloadexternal_mesa3d-bb290b5679745e3b7f84dd14174aae6688ab4cac.zip
external_mesa3d-bb290b5679745e3b7f84dd14174aae6688ab4cac.tar.gz
external_mesa3d-bb290b5679745e3b7f84dd14174aae6688ab4cac.tar.bz2
glsl: Remove ir_function_signature::_is_intrinsic field
text data bss dec hex filename 6036491 283160 28608 6348259 60dde3 lib64/i965_dri.so before 6036395 283160 28608 6348163 60dd83 lib64/i965_dri.so after Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/builtin_functions.cpp2
-rw-r--r--src/compiler/glsl/ir.cpp2
-rw-r--r--src/compiler/glsl/ir.h11
-rw-r--r--src/compiler/glsl/link_functions.cpp1
-rw-r--r--src/compiler/glsl/lower_shared_reference.cpp3
-rw-r--r--src/compiler/glsl/lower_ubo_reference.cpp3
6 files changed, 5 insertions, 17 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
index 84b416d..258671a 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -3266,7 +3266,6 @@ builtin_builder::new_sig(const glsl_type *return_type,
#define MAKE_INTRINSIC(return_type, id, avail, ...) \
ir_function_signature *sig = \
new_sig(return_type, avail, __VA_ARGS__); \
- sig->_is_intrinsic = true; \
sig->intrinsic_id = id;
ir_function_signature *
@@ -5601,7 +5600,6 @@ builtin_builder::_image(image_prototype_ctr prototype,
sig->is_defined = true;
} else {
- sig->_is_intrinsic = true;
sig->intrinsic_id = id;
}
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index e576f9b..c5943e5 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -1617,7 +1617,7 @@ ir_variable::get_extension_warning() const
ir_function_signature::ir_function_signature(const glsl_type *return_type,
builtin_available_predicate b)
: ir_instruction(ir_type_function_signature),
- return_type(return_type), is_defined(false), _is_intrinsic(false),
+ return_type(return_type), is_defined(false),
intrinsic_id(ir_intrinsic_invalid), builtin_avail(b), _function(NULL)
{
this->origin = NULL;
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
index 241d31f..388b1be 100644
--- a/src/compiler/glsl/ir.h
+++ b/src/compiler/glsl/ir.h
@@ -1187,17 +1187,14 @@ public:
/** Whether or not this function signature is a built-in. */
bool is_builtin() const;
- /** Whehter or not this function signautre is an intrinsic. */
- inline bool is_intrinsic() const
- {
- return _is_intrinsic;
- }
-
/**
* Whether or not this function is an intrinsic to be implemented
* by the driver.
*/
- bool _is_intrinsic;
+ inline bool is_intrinsic() const
+ {
+ return intrinsic_id != ir_intrinsic_invalid;
+ }
/** Indentifier for this intrinsic. */
enum ir_intrinsic_id intrinsic_id;
diff --git a/src/compiler/glsl/link_functions.cpp b/src/compiler/glsl/link_functions.cpp
index 3b669cc..56d2933 100644
--- a/src/compiler/glsl/link_functions.cpp
+++ b/src/compiler/glsl/link_functions.cpp
@@ -161,7 +161,6 @@ public:
linked_sig->replace_parameters(&formal_parameters);
- linked_sig->_is_intrinsic = sig->_is_intrinsic;
linked_sig->intrinsic_id = sig->intrinsic_id;
if (sig->is_defined) {
diff --git a/src/compiler/glsl/lower_shared_reference.cpp b/src/compiler/glsl/lower_shared_reference.cpp
index 8f134b6..b909891 100644
--- a/src/compiler/glsl/lower_shared_reference.cpp
+++ b/src/compiler/glsl/lower_shared_reference.cpp
@@ -284,7 +284,6 @@ lower_shared_reference_visitor::shared_store(void *mem_ctx,
ir_function_signature(glsl_type::void_type, compute_shader_enabled);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->_is_intrinsic = true;
sig->intrinsic_id = ir_intrinsic_shared_store;
ir_function *f = new(mem_ctx) ir_function("__intrinsic_store_shared");
@@ -312,7 +311,6 @@ lower_shared_reference_visitor::shared_load(void *mem_ctx,
new(mem_ctx) ir_function_signature(type, compute_shader_enabled);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->_is_intrinsic = true;
sig->intrinsic_id = ir_intrinsic_shared_load;
ir_function *f = new(mem_ctx) ir_function("__intrinsic_load_shared");
@@ -406,7 +404,6 @@ lower_shared_reference_visitor::lower_shared_atomic_intrinsic(ir_call *ir)
compute_shader_enabled);
assert(sig);
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);
diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp
index 71919fb..37134a9 100644
--- a/src/compiler/glsl/lower_ubo_reference.cpp
+++ b/src/compiler/glsl/lower_ubo_reference.cpp
@@ -453,7 +453,6 @@ lower_ubo_reference_visitor::ssbo_store(void *mem_ctx,
ir_function_signature(glsl_type::void_type, shader_storage_buffer_object);
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");
@@ -491,7 +490,6 @@ lower_ubo_reference_visitor::ssbo_load(void *mem_ctx,
new(mem_ctx) ir_function_signature(type, shader_storage_buffer_object);
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");
@@ -1018,7 +1016,6 @@ lower_ubo_reference_visitor::lower_ssbo_atomic_intrinsic(ir_call *ir)
shader_storage_buffer_object);
assert(sig);
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);