[Mesa-dev] [PATCH v2 49/52] spirv: Add a vtn_constant_value helper

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri Oct 13 10:55:53 UTC 2017


Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

On 13/10/17 06:48, Jason Ekstrand wrote:
> ---
>   src/compiler/spirv/vtn_private.h | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
> index 8458462..e7a7c36 100644
> --- a/src/compiler/spirv/vtn_private.h
> +++ b/src/compiler/spirv/vtn_private.h
> @@ -557,6 +557,12 @@ vtn_value(struct vtn_builder *b, uint32_t value_id,
>      return val;
>   }
>   
> +static inline nir_constant *
> +vtn_constant_value(struct vtn_builder *b, uint32_t value_id)
> +{
> +   return vtn_value(b, value_id, vtn_value_type_constant)->constant;
> +}
> +
>   void _vtn_warn(const char *file, int line, const char *msg, ...);
>   #define vtn_warn(...) _vtn_warn(__FILE__, __LINE__, __VA_ARGS__)
>   




More information about the mesa-dev mailing list