<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 21, 2019 at 3:45 AM Juan A. Suarez Romero <<a href="mailto:jasuarez@igalia.com">jasuarez@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On one side, when emitting 3DSTATE_SF, VertexSubPixelPrecisionSelect is<br>
used to select between 8 bit subpixel precision (value 0) or 4 bit<br>
subpixel precision (value 1). As this value is not set, means it is<br>
taking the value 0, so 8 bit are used.<br>
<br>
On the other side, in the Vulkan CTS tests, if the reference rasterizer,<br>
which uses 8 bit precision, as it is used to check what should be the<br>
expected value for the tests, is changed to use 4 bit as ANV was<br>
advertising so far, some of the tests will fail.<br>
<br>
So it seems ANV is actually using 8 bits.<br>
<br>
v2: explicitly set 3DSTATE_SF::VertexSubPixelPrecisionSelect (Jason)<br>
<br>
CC: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
CC: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>><br>
---<br>
 src/intel/vulkan/anv_device.c  | 2 +-<br>
 src/intel/vulkan/genX_pipeline.c | 1 +<br>
 2 files changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c<br>
index 3120865466a..95224407318 100644<br>
--- a/src/intel/vulkan/anv_device.c<br>
+++ b/src/intel/vulkan/anv_device.c<br>
@@ -1095,7 +1095,7 @@ void anv_GetPhysicalDeviceProperties(<br>
     16 * devinfo->max_cs_threads,<br>
     16 * devinfo->max_cs_threads,<br>
    },<br>
-   .subPixelPrecisionBits          = 4 /* FIXME */,<br>
+   .subPixelPrecisionBits          = 8,<br>
    .subTexelPrecisionBits          = 4 /* FIXME */,<br>
    .mipmapPrecisionBits           = 4 /* FIXME */,<br>
    .maxDrawIndexedIndexValue         = UINT32_MAX,<br>
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c<br>
index 6255e5d83c5..b06036a6fc7 100644<br>
--- a/src/intel/vulkan/genX_pipeline.c<br>
+++ b/src/intel/vulkan/genX_pipeline.c<br>
@@ -464,6 +464,7 @@ emit_rs_state(struct anv_pipeline *pipeline,<br>
  sf.TriangleStripListProvokingVertexSelect = 0;<br>
  sf.LineStripListProvokingVertexSelect = 0;<br>
  sf.TriangleFanProvokingVertexSelect = 1;<br>
+  sf.VertexSubPixelPrecisionSelect = 0;<br></blockquote><div><br></div><div>Please use the _8bit #define. It looks like you may have to modify the gen7 XML (and possibly earlier if you don't mind) to add the enum values.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
  const struct brw_vue_prog_data *last_vue_prog_data =<br>
    anv_pipeline_get_last_vue_prog_data(pipeline);<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div></div>