spirv: Choose atomic deref type with pointer_uses_ssa_offset

Previously, we hard-coded the rule about workgroup variables and the
builder lower_workgroup_access_to_offsets flag.  Instead base it on the
handy helper we have for exactly this sort of thing.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
Jason Ekstrand
2018-12-14 18:20:00 -06:00
committed by Jason Ekstrand
parent 5c3cb9c3ce
commit be039cb467
3 changed files with 43 additions and 42 deletions

View File

@@ -44,7 +44,7 @@ vtn_access_chain_create(struct vtn_builder *b, unsigned length)
return chain;
}
static bool
bool
vtn_pointer_uses_ssa_offset(struct vtn_builder *b,
struct vtn_pointer *ptr)
{