summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_named_interface_blocks.cpp
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2015-05-13 10:41:55 +0200
committerSamuel Iglesias Gonsalvez <[email protected]>2015-07-14 07:04:03 +0200
commit18feaa8f36b311c443fd56666507ec1768fb9582 (patch)
tree2fd84214a9a397fc02591b3300df37486da58f0d /src/glsl/lower_named_interface_blocks.cpp
parent3095ee9b8bd4154cc63b6332c21b16954555e241 (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/lower_named_interface_blocks.cpp')
-rw-r--r--src/glsl/lower_named_interface_blocks.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/lower_named_interface_blocks.cpp b/src/glsl/lower_named_interface_blocks.cpp
index 7304c51399a..28d7987d3c3 100644
--- a/src/glsl/lower_named_interface_blocks.cpp
+++ b/src/glsl/lower_named_interface_blocks.cpp
@@ -108,7 +108,8 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions)
* but, this will require changes to the other uniform block
* support code.
*/
- if (var->data.mode == ir_var_uniform)
+ if (var->data.mode == ir_var_uniform ||
+ var->data.mode == ir_var_shader_storage)
continue;
const glsl_type * iface_t = var->type;
@@ -212,7 +213,7 @@ flatten_named_interface_blocks_declarations::handle_rvalue(ir_rvalue **rvalue)
* but, this will require changes to the other uniform block
* support code.
*/
- if (var->data.mode == ir_var_uniform)
+ if (var->data.mode == ir_var_uniform || var->data.mode == ir_var_shader_storage)
return;
if (var->get_interface_type() != NULL) {