mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
nir/spirv: Allow creating local/global variables from interface types
Not sure if this is actually allowed, but it's not that hard to just strip the interface information from the type.
This commit is contained in:
parent
350bbd3d15
commit
b208620fd2
1 changed files with 3 additions and 1 deletions
|
|
@ -1740,9 +1740,11 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
|
|||
break;
|
||||
case SpvStorageClassPrivate:
|
||||
var->data.mode = nir_var_global;
|
||||
var->interface_type = NULL;
|
||||
break;
|
||||
case SpvStorageClassFunction:
|
||||
var->data.mode = nir_var_local;
|
||||
var->interface_type = NULL;
|
||||
break;
|
||||
case SpvStorageClassWorkgroup:
|
||||
case SpvStorageClassCrossWorkgroup:
|
||||
|
|
@ -1798,7 +1800,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
|
|||
/* Interface block variables aren't actually going to be referenced
|
||||
* by the generated NIR, so we don't put them in the list
|
||||
*/
|
||||
if (interface_type && glsl_type_is_struct(interface_type->type))
|
||||
if (var->interface_type)
|
||||
break;
|
||||
|
||||
if (var->data.mode == nir_var_local) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue