spirv: Rework handling of spec constant workgroup size built-ins
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 23 Jan 2019 18:49:15 +0000 (12:49 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 1 Feb 2019 17:34:02 +0000 (17:34 +0000)
commit7d862ef53024b70458929c1665af43573b4d07ff
treeacf9188bb799242e2dfa1a2e5e9364f00063ae8e
parent9b37e93e4256ab1610bff5cdacc1e846467fc19d
spirv: Rework handling of spec constant workgroup size built-ins

Instead of handling it as part of the handling of constant instructions,
just stash the vtn_value when we see the decoration and handle it
explicitly later.  This will let us re-order handling of constant
instructions without breaking the Vulkan SPIR-V requirement that
decorating a specialization constant as the WorkgroupSize built-in
overrides the workgroup size set as an execution mode.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h