spirv/vtn: handle variable pointers without offset lowering

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Dave Airlie
2018-07-04 16:21:49 +10:00
parent dca35c598d
commit 2f4f5a5055
2 changed files with 10 additions and 8 deletions

View File

@@ -1650,7 +1650,8 @@ vtn_pointer_from_ssa(struct vtn_builder *b, nir_ssa_def *ssa,
vtn_assert(ssa->num_components == 2);
ptr->block_index = nir_channel(&b->nb, ssa, 0);
ptr->offset = nir_channel(&b->nb, ssa, 1);
} else if (ptr->mode == vtn_variable_mode_workgroup ||
} else if ((ptr->mode == vtn_variable_mode_workgroup &&
b->options->lower_workgroup_access_to_offsets) ||
ptr->mode == vtn_variable_mode_push_constant) {
/* This pointer type needs to have actual storage */
vtn_assert(ptr_type->type);