spirv: Allow ignoring decorations for workgroup variables

Since we switched over to lowering SLM access directly in SPIR-V -> NIR,
we no longer have vtn_variables for SLM.  It's all safe as with UBOs and
SSBOs but we need to let it through in the assert.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104213
Fixes: 8761a04d0d
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Jason Ekstrand 2017-12-11 15:31:22 -08:00
parent 2bc9123c33
commit 24f019fd69
1 changed files with 3 additions and 1 deletions

View File

@ -1533,7 +1533,9 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
*/
vtn_assert(vtn_var->mode == vtn_variable_mode_ubo ||
vtn_var->mode == vtn_variable_mode_ssbo ||
vtn_var->mode == vtn_variable_mode_push_constant);
vtn_var->mode == vtn_variable_mode_push_constant ||
(vtn_var->mode == vtn_variable_mode_workgroup &&
b->options->lower_workgroup_access_to_offsets));
}
}
}