<div dir="ltr">While we're at it, we could make the fields in brw_wm_prog_data::computed_depth_mode use the actual enum type.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 10:26 AM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 9:29 AM, Rafael Antognolli <span dir="ltr"><<a href="mailto:rafael.antognolli@intel.com" target="_blank">rafael.antognolli@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These enums live inside struct brw_wm_prog_data, so it makes sense to<br>
keep them in the same header. It also allows to use them without<br>
including brw_eu_defines.h.<br>
<br>
Signed-off-by: Rafael Antognolli <<a href="mailto:rafael.antognolli@intel.com" target="_blank">rafael.antognolli@intel.com</a>><br>
---<br>
 src/intel/compiler/brw_compil<wbr>er.h   | 21 +++++++++++++++++++++<br>
 src/intel/compiler/brw_eu_def<wbr>ines.h | 21 ---------------------<br>
 2 files changed, 21 insertions(+), 21 deletions(-)<br>
<br>
diff --git a/src/intel/compiler/brw_compi<wbr>ler.h b/src/intel/compiler/brw_compi<wbr>ler.h<br>
index 9228413..b5b1ee9 100644<br>
--- a/src/intel/compiler/brw_compi<wbr>ler.h<br>
+++ b/src/intel/compiler/brw_compi<wbr>ler.h<br>
@@ -458,6 +458,27 @@ brw_mark_surface_used(struct brw_stage_prog_data *prog_data,<br>
       MAX2(prog_data->binding_<wbr>table.size_bytes, (surf_index + 1) * 4);<br>
 }<br>
<br>
+enum brw_barycentric_mode {<br>
+   BRW_BARYCENTRIC_PERSPECTIVE_P<wbr>IXEL       = 0,<br>
+   BRW_BARYCENTRIC_PERSPECTIVE_C<wbr>ENTROID    = 1,<br>
+   BRW_BARYCENTRIC_PERSPECTIVE_S<wbr>AMPLE      = 2,<br>
+   BRW_BARYCENTRIC_NONPERSPECTIV<wbr>E_PIXEL    = 3,<br>
+   BRW_BARYCENTRIC_NONPERSPECTIV<wbr>E_CENTROID = 4,<br>
+   BRW_BARYCENTRIC_NONPERSPECTIV<wbr>E_SAMPLE   = 5,<br>
+   BRW_BARYCENTRIC_MODE_COUNT              = 6<br>
+};<br>
+#define BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_BITS \<br>
+   ((1 << BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_PIXEL) | \<br>
+    (1 << BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_CENTROID) | \<br>
+    (1 << BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_SAMPLE))<br>
+<br>
+enum brw_pixel_shader_computed_dept<wbr>h_mode {<br>
+   BRW_PSCDEPTH_OFF   = 0, /* PS does not compute depth */<br>
+   BRW_PSCDEPTH_ON    = 1, /* PS computes depth; no guarantee about value */<br>
+   BRW_PSCDEPTH_ON_GE = 2, /* PS guarantees output depth >= source depth */<br>
+   BRW_PSCDEPTH_ON_LE = 3, /* PS guarantees output depth <= source depth */<br>
+};<br>
+<br>
 /* Data about a particular attempt to compile a program.  Note that<br>
  * there can be many of these, each in a different GL state<br>
  * corresponding to a different brw_wm_prog_key struct, with different<br>
diff --git a/src/intel/compiler/brw_eu_de<wbr>fines.h b/src/intel/compiler/brw_eu_de<wbr>fines.h<br>
index 13a70f6..ccc838d 100644<br>
--- a/src/intel/compiler/brw_eu_de<wbr>fines.h<br>
+++ b/src/intel/compiler/brw_eu_de<wbr>fines.h<br>
@@ -72,27 +72,6 @@<br>
 #define _3DPRIM_TRIFAN_NOSTIPPLE  0x16<br>
 #define _3DPRIM_PATCHLIST(n) ({ assert(n > 0 && n <= 32); 0x20 + (n - 1); })<br>
<br>
-enum brw_barycentric_mode {<br>
-   BRW_BARYCENTRIC_PERSPECTIVE_P<wbr>IXEL       = 0,<br>
-   BRW_BARYCENTRIC_PERSPECTIVE_C<wbr>ENTROID    = 1,<br>
-   BRW_BARYCENTRIC_PERSPECTIVE_S<wbr>AMPLE      = 2,<br>
-   BRW_BARYCENTRIC_NONPERSPECTIV<wbr>E_PIXEL    = 3,<br>
-   BRW_BARYCENTRIC_NONPERSPECTIV<wbr>E_CENTROID = 4,<br>
-   BRW_BARYCENTRIC_NONPERSPECTIV<wbr>E_SAMPLE   = 5,<br>
-   BRW_BARYCENTRIC_MODE_COUNT              = 6<br>
-};<br>
-#define BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_BITS \<br>
-   ((1 << BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_PIXEL) | \<br>
-    (1 << BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_CENTROID) | \<br>
-    (1 << BRW_BARYCENTRIC_NONPERSPECTIVE<wbr>_SAMPLE))<br>
-<br>
-enum brw_pixel_shader_computed_dept<wbr>h_mode {<br>
-   BRW_PSCDEPTH_OFF   = 0, /* PS does not compute depth */<br>
-   BRW_PSCDEPTH_ON    = 1, /* PS computes depth; no guarantee about value */<br>
-   BRW_PSCDEPTH_ON_GE = 2, /* PS guarantees output depth >= source depth */<br>
-   BRW_PSCDEPTH_ON_LE = 3, /* PS guarantees output depth <= source depth */<br>
-};<br>
-<br>
 /* Bitfields for the URB_WRITE message, DW2 of message header: */<br>
 #define URB_WRITE_PRIM_END             0x1<br>
 #define URB_WRITE_PRIM_START           0x2<br>
<span class="m_5657818724466930553HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>