summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_symbol_table.cpp
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2015-05-13 10:41:55 +0200
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>2015-07-14 07:04:03 +0200
commit18feaa8f36b311c443fd56666507ec1768fb9582 (patch)
tree2fd84214a9a397fc02591b3300df37486da58f0d /src/glsl/glsl_symbol_table.cpp
parent3095ee9b8bd4154cc63b6332c21b16954555e241 (diff)
downloadexternal_mesa3d-18feaa8f36b311c443fd56666507ec1768fb9582.zip
external_mesa3d-18feaa8f36b311c443fd56666507ec1768fb9582.tar.gz
external_mesa3d-18feaa8f36b311c443fd56666507ec1768fb9582.tar.bz2
glsl: Add ir_var_shader_storage
This will be used to identify buffer variables inside shader storage buffer objects, which are very similar to uniforms except for a few differences, most important of which is that they are writable. Since buffer variables are so similar to uniforms, we will almost always want them to go through the same paths as uniforms. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/glsl/glsl_symbol_table.cpp')
-rw-r--r--src/glsl/glsl_symbol_table.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index 2294dda..536f0a3 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -36,6 +36,9 @@ public:
case ir_var_uniform:
dest = &ibu;
break;
+ case ir_var_shader_storage:
+ dest = &iss;
+ break;
case ir_var_shader_in:
dest = &ibi;
break;
@@ -60,6 +63,8 @@ public:
switch (mode) {
case ir_var_uniform:
return ibu;
+ case ir_var_shader_storage:
+ return iss;
case ir_var_shader_in:
return ibi;
case ir_var_shader_out:
@@ -71,24 +76,25 @@ public:
}
symbol_table_entry(ir_variable *v) :
- v(v), f(0), t(0), ibu(0), ibi(0), ibo(0), a(0) {}
+ v(v), f(0), t(0), ibu(0), iss(0), ibi(0), ibo(0), a(0) {}
symbol_table_entry(ir_function *f) :
- v(0), f(f), t(0), ibu(0), ibi(0), ibo(0), a(0) {}
+ v(0), f(f), t(0), ibu(0), iss(0), ibi(0), ibo(0), a(0) {}
symbol_table_entry(const glsl_type *t) :
- v(0), f(0), t(t), ibu(0), ibi(0), ibo(0), a(0) {}
+ v(0), f(0), t(t), ibu(0), iss(0), ibi(0), ibo(0), a(0) {}
symbol_table_entry(const glsl_type *t, enum ir_variable_mode mode) :
- v(0), f(0), t(0), ibu(0), ibi(0), ibo(0), a(0)
+ v(0), f(0), t(0), ibu(0), iss(0), ibi(0), ibo(0), a(0)
{
assert(t->is_interface());
add_interface(t, mode);
}
symbol_table_entry(const class ast_type_specifier *a):
- v(0), f(0), t(0), ibu(0), ibi(0), ibo(0), a(a) {}
+ v(0), f(0), t(0), ibu(0), iss(0), ibi(0), ibo(0), a(a) {}
ir_variable *v;
ir_function *f;
const glsl_type *t;
const glsl_type *ibu;
+ const glsl_type *iss;
const glsl_type *ibi;
const glsl_type *ibo;
const class ast_type_specifier *a;