diff options
author | Kristian Høgsberg <[email protected]> | 2015-05-13 10:41:55 +0200 |
---|---|---|
committer | Samuel Iglesias Gonsalvez <[email protected]> | 2015-07-14 07:04:03 +0200 |
commit | 18feaa8f36b311c443fd56666507ec1768fb9582 (patch) | |
tree | 2fd84214a9a397fc02591b3300df37486da58f0d /src/glsl/ir.h | |
parent | 3095ee9b8bd4154cc63b6332c21b16954555e241 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index f9045553501..2b9533a6437 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -324,6 +324,7 @@ protected: enum ir_variable_mode { ir_var_auto = 0, /**< Function local variables and globals. */ ir_var_uniform, /**< Variable declared as a uniform. */ + ir_var_shader_storage, /**< Variable declared as an ssbo. */ ir_var_shader_in, ir_var_shader_out, ir_var_function_in, @@ -445,7 +446,9 @@ public: */ inline bool is_in_uniform_block() const { - return this->data.mode == ir_var_uniform && this->interface_type != NULL; + return (this->data.mode == ir_var_uniform || + this->data.mode == ir_var_shader_storage) && + this->interface_type != NULL; } /** |