diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-12-19 15:56:55 -0800 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-01-15 07:20:23 -0800 |
commit | e4115ca9d824a27176c58fdeede392d4d99b0cab (patch) | |
tree | fd85cc317eabe2609a5595cea6cc2dde03057b4e /src/glsl/nir/nir.h | |
parent | ed13f4e716f24f9d3ed89fd171bd13e3be548e3c (diff) |
nir: Make intrinsic flags into an enum
This should be much better for debugging as GDB will pick up on the fact
that it's an enum and actually tell you what you're looking at instead of
giving you some arbitrary hex value you have to go look up.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r-- | src/glsl/nir/nir.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 5d8d3ce6b3..201304b2f1 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -754,20 +754,20 @@ typedef struct { * * \sa nir_intrinsic_info::flags */ -/*@{*/ -/** - * whether the intrinsic can be safely eliminated if none of its register - * outputs are being used. - */ -#define NIR_INTRINSIC_CAN_ELIMINATE (1 << 0) +typedef enum { + /** + * whether the intrinsic can be safely eliminated if none of its output + * value is not being used. + */ + NIR_INTRINSIC_CAN_ELIMINATE = (1 << 0), -/** - * Whether the intrinsic can be reordered with respect to any other intrinsic, - * i.e. whether the only reodering dependencies of the intrinsic are due to the - * register reads/writes. - */ -#define NIR_INTRINSIC_CAN_REORDER (1 << 1) -/*@}*/ + /** + * Whether the intrinsic can be reordered with respect to any other + * intrinsic, i.e. whether the only reordering dependencies of the + * intrinsic are due to the register reads/writes. + */ + NIR_INTRINSIC_CAN_REORDER = (1 << 1), +} nir_intrinsic_semantic_flag; #define NIR_INTRINSIC_MAX_INPUTS 4 @@ -799,7 +799,7 @@ typedef struct { unsigned num_indices; /** semantic flags for calls to this intrinsic */ - unsigned flags; + nir_intrinsic_semantic_flag flags; } nir_intrinsic_info; extern const nir_intrinsic_info nir_intrinsic_infos[nir_num_intrinsics]; |