Commit e4115ca9 authored by Jason Ekstrand's avatar Jason Ekstrand
Browse files

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: default avatarConnor Abbott <cwabbott0@gmail.com>
parent ed13f4e7
...@@ -754,20 +754,20 @@ typedef struct { ...@@ -754,20 +754,20 @@ typedef struct {
* *
* \sa nir_intrinsic_info::flags * \sa nir_intrinsic_info::flags
*/ */
/*@{*/ typedef enum {
/** /**
* whether the intrinsic can be safely eliminated if none of its register * whether the intrinsic can be safely eliminated if none of its output
* outputs are being used. * value is not being used.
*/ */
#define NIR_INTRINSIC_CAN_ELIMINATE (1 << 0) NIR_INTRINSIC_CAN_ELIMINATE = (1 << 0),
/** /**
* Whether the intrinsic can be reordered with respect to any other intrinsic, * Whether the intrinsic can be reordered with respect to any other
* i.e. whether the only reodering dependencies of the intrinsic are due to the * intrinsic, i.e. whether the only reordering dependencies of the
* register reads/writes. * intrinsic are due to the register reads/writes.
*/ */
#define NIR_INTRINSIC_CAN_REORDER (1 << 1) NIR_INTRINSIC_CAN_REORDER = (1 << 1),
/*@}*/ } nir_intrinsic_semantic_flag;
#define NIR_INTRINSIC_MAX_INPUTS 4 #define NIR_INTRINSIC_MAX_INPUTS 4
...@@ -799,7 +799,7 @@ typedef struct { ...@@ -799,7 +799,7 @@ typedef struct {
unsigned num_indices; unsigned num_indices;
/** semantic flags for calls to this intrinsic */ /** semantic flags for calls to this intrinsic */
unsigned flags; nir_intrinsic_semantic_flag flags;
} nir_intrinsic_info; } nir_intrinsic_info;
extern const nir_intrinsic_info nir_intrinsic_infos[nir_num_intrinsics]; extern const nir_intrinsic_info nir_intrinsic_infos[nir_num_intrinsics];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment