summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-05-04 11:03:47 -0700
committerKenneth Graunke <kenneth@whitecape.org>2017-05-04 16:17:34 -0700
commit31f094e6911bea91df72fb200aaa05b553e0302d (patch)
tree0c4e0fa17f6fa7235f4da1c7f23a171cf92ac8fc
parent194d9b27cc3fb49753a8ae41a322f8903f4e06cd (diff)
i965: Fix line width on Cherryview.
We just add another field to gen8.xml for the Cherryview line width, rather than trying to replicate the gymnastics done in the Vulkan driver to use gen9 SF pack functions. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--src/intel/genxml/gen8.xml1
-rw-r--r--src/mesa/drivers/dri/i965/genX_state_upload.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml
index c57ddb41a16..13924665601 100644
--- a/src/intel/genxml/gen8.xml
+++ b/src/intel/genxml/gen8.xml
@@ -2032,6 +2032,7 @@
<field name="Legacy Global Depth Bias Enable" start="43" end="43" type="bool"/>
<field name="Statistics Enable" start="42" end="42" type="bool"/>
<field name="Viewport Transform Enable" start="33" end="33" type="bool"/>
+ <field name="CHV Line Width" start="44" end="61" type="u11.7"/>
<field name="Line Width" start="82" end="91" type="u3.7"/>
<field name="Line End Cap Antialiasing Region Width" start="80" end="81" type="uint">
<value name="0.5 pixels" value="0"/>
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index ceeacfcdef7..b6aa7c84d1d 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -1379,7 +1379,14 @@ genX(upload_sf)(struct brw_context *brw)
#endif
/* _NEW_LINE */
+#if GEN_GEN == 8
+ if (brw->is_cherryview)
+ sf.CHVLineWidth = brw_get_line_width_float(brw);
+ else
+ sf.LineWidth = brw_get_line_width_float(brw);
+#else
sf.LineWidth = brw_get_line_width_float(brw);
+#endif
if (ctx->Line.SmoothFlag) {
sf.LineEndCapAntialiasingRegionWidth = _10pixels;