diff options
author | Samuel Iglesias Gonsalvez <[email protected]> | 2015-03-18 15:32:03 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsalvez <[email protected]> | 2015-09-25 08:39:21 +0200 |
commit | f3f64cd0c4b9cf3363056ddc9c4d7616614ce829 (patch) | |
tree | 5b355b772fca5c6df5c3fe3421570ddfb773e862 /src/glsl/ir.h | |
parent | f45d39f6afc436ee4c68a21382933b2b39879eef (diff) |
glsl: add support for unsized arrays in shader storage blocks
They only can be defined in the last position of the shader
storage blocks.
When an unsized array is used in different shaders, it might be
converted in different sized arrays, avoid get a linker error
in that case.
v2:
- Rework error condition and error messages (Timothy Arceri)
v3:
- Move OpenGL ES check to its own patch.
Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index cf1954b1257..48b6795cc09 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -453,6 +453,15 @@ public: } /** + * Determine whether or not a variable is part of a shader storage block. + */ + inline bool is_in_shader_storage_block() const + { + return this->data.mode == ir_var_shader_storage && + this->interface_type != NULL; + } + + /** * Determine whether or not a variable is the declaration of an interface * block * @@ -778,6 +787,11 @@ public: unsigned image_restrict:1; /** + * ARB_shader_storage_buffer_object + */ + unsigned from_ssbo_unsized_array:1; /**< unsized array buffer variable. */ + + /** * Emit a warning if this variable is accessed. */ private: |