diff options
author | Jordan Justen <[email protected]> | 2015-11-16 18:09:27 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2015-12-09 23:50:38 -0800 |
commit | ee005df2f90930675a1f955030014a66dfa255da (patch) | |
tree | 4c85f5d3377561dc4f018c8cffc0bdef4d5ae5e2 /src/glsl/lower_buffer_access.h | |
parent | 99c8196458dc8f299d0b49c8ee801d6e9a2bc1db (diff) |
glsl ubo/ssbo: Move common code into lower_buffer_access::setup_buffer_access
This code will also be usable by the pass to lower shared variables.
Note, that *const_offset is adjusted by setup_buffer_access so it must
be initialized before calling setup_buffer_access.
v2:
* Add comment for lower_buffer_access::setup_buffer_access
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glsl/lower_buffer_access.h')
-rw-r--r-- | src/glsl/lower_buffer_access.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/lower_buffer_access.h b/src/glsl/lower_buffer_access.h index 806687609b5..cc4614e9792 100644 --- a/src/glsl/lower_buffer_access.h +++ b/src/glsl/lower_buffer_access.h @@ -53,6 +53,11 @@ public: unsigned int packing, unsigned int write_mask); bool is_dereferenced_thing_row_major(const ir_rvalue *deref); + + void setup_buffer_access(void *mem_ctx, ir_variable *var, ir_rvalue *deref, + ir_rvalue **offset, unsigned *const_offset, + bool *row_major, int *matrix_columns, + unsigned packing); }; } /* namespace lower_buffer_access */ |