spirv: Add a vtn_type field to all vtn_values

At the moment, this just lets us drop the const_type for constants and
unify things a bit.  Eventually, we will use this to store the types of
all SPIR-V SSA values.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Jason Ekstrand
2017-12-05 21:39:51 -08:00
parent ba4bb0838b
commit 2c84b49ddf
2 changed files with 31 additions and 42 deletions

View File

@@ -480,14 +480,11 @@ struct vtn_value {
enum vtn_value_type value_type;
const char *name;
struct vtn_decoration *decoration;
struct vtn_type *type;
union {
void *ptr;
char *str;
struct vtn_type *type;
struct {
nir_constant *constant;
const struct glsl_type *const_type;
};
nir_constant *constant;
struct vtn_pointer *pointer;
struct vtn_image_pointer *image;
struct vtn_sampled_image *sampled_image;