mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glsl: mark variables produced by lower_named_interface_blocks.
These variables will need to be treated specially by program_resource_visitor, so that they can be addressed through the API using their interface block name (and array index, for interface block arrays). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
99512dc40d
commit
4b97c581b4
2 changed files with 20 additions and 0 deletions
|
|
@ -580,6 +580,24 @@ public:
|
|||
*/
|
||||
unsigned location_frac:2;
|
||||
|
||||
/**
|
||||
* Non-zero if this variable was created by lowering a named interface
|
||||
* block which was not an array.
|
||||
*
|
||||
* Note that this variable and \c from_named_ifc_block_array will never
|
||||
* both be non-zero.
|
||||
*/
|
||||
unsigned from_named_ifc_block_nonarray:1;
|
||||
|
||||
/**
|
||||
* Non-zero if this variable was created by lowering a named interface
|
||||
* block which was an array.
|
||||
*
|
||||
* Note that this variable and \c from_named_ifc_block_nonarray will never
|
||||
* both be non-zero.
|
||||
*/
|
||||
unsigned from_named_ifc_block_array:1;
|
||||
|
||||
/**
|
||||
* \brief Layout qualifier for gl_FragDepth.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions)
|
|||
new(mem_ctx) ir_variable(iface_t->fields.structure[i].type,
|
||||
var_name,
|
||||
(ir_variable_mode) var->mode);
|
||||
new_var->from_named_ifc_block_nonarray = 1;
|
||||
} else {
|
||||
const glsl_type *new_array_type =
|
||||
glsl_type::get_array_instance(
|
||||
|
|
@ -149,6 +150,7 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions)
|
|||
new(mem_ctx) ir_variable(new_array_type,
|
||||
var_name,
|
||||
(ir_variable_mode) var->mode);
|
||||
new_var->from_named_ifc_block_array = 1;
|
||||
}
|
||||
new_var->location = iface_t->fields.structure[i].location;
|
||||
new_var->explicit_location = (new_var->location >= 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue