<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 5, 2015 at 11:26 PM, Connor Abbott <span dir="ltr"><<a href="mailto:cwabbott0@gmail.com" target="_blank">cwabbott0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you make the fields lowercase to match the algebraic properties<br>
enum? Or did you make that uppercase? Lowercase feels better to me<br>
since it's an enum, but I don't really care too much.<br></blockquote><div><br></div><div>I prefer upper-case for bitfields which is really what it is. I also did that for the algebraic properties.<br><br>FWIW, I considered moving the other enums to upper-case but it was too much typing and they're probably fine as-is.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
On Fri, Dec 19, 2014 at 8:02 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> This should be much better for debugging as GDB will pick up on the fact<br>
> that it's an enum and actually tell you what you're looking at instead of<br>
> giving you some arbitrary hex value you have to go look up.<br>
> ---<br>
> src/glsl/nir/nir.h | 28 ++++++++++++++--------------<br>
> 1 file changed, 14 insertions(+), 14 deletions(-)<br>
><br>
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h<br>
> index 8b3c2c2..ab9383e 100644<br>
> --- a/src/glsl/nir/nir.h<br>
> +++ b/src/glsl/nir/nir.h<br>
> @@ -754,20 +754,20 @@ typedef struct {<br>
> *<br>
> * \sa nir_intrinsic_info::flags<br>
> */<br>
> -/*@{*/<br>
> -/**<br>
> - * whether the intrinsic can be safely eliminated if none of its register<br>
> - * outputs are being used.<br>
> - */<br>
> -#define NIR_INTRINSIC_CAN_ELIMINATE (1 << 0)<br>
> +typedef enum {<br>
> + /**<br>
> + * whether the intrinsic can be safely eliminated if none of its output<br>
> + * value is not being used.<br>
> + */<br>
> + NIR_INTRINSIC_CAN_ELIMINATE = (1 << 0),<br>
><br>
> -/**<br>
> - * Whether the intrinsic can be reordered with respect to any other intrinsic,<br>
> - * i.e. whether the only reodering dependencies of the intrinsic are due to the<br>
> - * register reads/writes.<br>
> - */<br>
> -#define NIR_INTRINSIC_CAN_REORDER (1 << 1)<br>
> -/*@}*/<br>
> + /**<br>
> + * Whether the intrinsic can be reordered with respect to any other<br>
> + * intrinsic, i.e. whether the only reordering dependencies of the<br>
> + * intrinsic are due to the register reads/writes.<br>
> + */<br>
> + NIR_INTRINSIC_CAN_REORDER = (1 << 1),<br>
> +} nir_intrinsic_semantic_flag;<br>
><br>
> #define NIR_INTRINSIC_MAX_INPUTS 4<br>
><br>
> @@ -799,7 +799,7 @@ typedef struct {<br>
> unsigned num_indices;<br>
><br>
> /** semantic flags for calls to this intrinsic */<br>
> - unsigned flags;<br>
> + nir_intrinsic_semantic_flag flags;<br>
> } nir_intrinsic_info;<br>
><br>
> extern const nir_intrinsic_info nir_intrinsic_infos[nir_num_intrinsics];<br>
> --<br>
> 2.2.0<br>
><br>
</div></div>> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>