mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
spirv: Allow block-decorated struct types for constants
Whenever a struct type is decorated Block or BufferBlock we turn that into a GLSL_TYPE_INTERFACE. Since these decorations can end up random places, we should allow them for constants. Closes: #3252 Fixes:9d0ae777dd"spirv: Use interface type for block and buffer..." Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855> (cherry picked from commit351b5137d7)
This commit is contained in:
parent
32d2431a55
commit
fd3caf5828
3 changed files with 4 additions and 2 deletions
|
|
@ -3829,7 +3829,7 @@
|
|||
"description": "spirv: Allow block-decorated struct types for constants",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "9d0ae777dd68dad682dcc7768726996639ae2684"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -399,6 +399,7 @@ print_constant(nir_constant *c, const struct glsl_type *type, print_state *state
|
|||
break;
|
||||
|
||||
case GLSL_TYPE_STRUCT:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
for (i = 0; i < c->num_elements; i++) {
|
||||
if (i > 0) fprintf(fp, ", ");
|
||||
fprintf(fp, "{ ");
|
||||
|
|
|
|||
|
|
@ -256,7 +256,8 @@ vtn_const_ssa_value(struct vtn_builder *b, nir_constant *constant,
|
|||
break;
|
||||
}
|
||||
|
||||
case GLSL_TYPE_STRUCT: {
|
||||
case GLSL_TYPE_STRUCT:
|
||||
case GLSL_TYPE_INTERFACE: {
|
||||
unsigned elems = glsl_get_length(val->type);
|
||||
val->elems = ralloc_array(b, struct vtn_ssa_value *, elems);
|
||||
for (unsigned i = 0; i < elems; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue