summaryrefslogtreecommitdiff
path: root/src/intel
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2019-02-22 16:47:53 +0100
committerDylan Baker <dylan@pnwbakers.com>2019-02-25 13:26:35 -0800
commit9f5622fe142bc4102b182a6c7c05f4c79d06b7d1 (patch)
tree259de485bc648c276bf8e72912bba1aac080fa6d /src/intel
parentbe1200d6a52b8550d8e0f9c73a7f64a30a088a09 (diff)
downloadmesa-9f5622fe142bc4102b182a6c7c05f4c79d06b7d1.tar.gz
mesa-9f5622fe142bc4102b182a6c7c05f4c79d06b7d1.tar.bz2
mesa-9f5622fe142bc4102b182a6c7c05f4c79d06b7d1.zip
anv: advertise 8 subpixel precision bits
On one side, when emitting 3DSTATE_SF, VertexSubPixelPrecisionSelect is used to select between 8 bit subpixel precision (value 0) or 4 bit subpixel precision (value 1). As this value is not set, means it is taking the value 0, so 8 bit are used. On the other side, in the Vulkan CTS tests, if the reference rasterizer, which uses 8 bit precision, as it is used to check what should be the expected value for the tests, is changed to use 4 bit as ANV was advertising so far, some of the tests will fail. So it seems ANV is actually using 8 bits. v2: explicitly set 3DSTATE_SF::VertexSubPixelPrecisionSelect (Jason) v3: use _8Bit definition as value (Jason) v4: (by Jason) anv: Explicitly set 3DSTATE_CLIP::VertexSubPixelPrecisionSelect This field was added on gen8 even though there's an identically defined one in 3DSTATE_SF. CC: Jason Ekstrand <jason@jlekstrand.net> CC: Kenneth Graunke <kenneth@whitecape.org> CC: 18.3 19.0 <mesa-stable@lists.freedesktop.org> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit 4f917e6a61860b58a05d40584f7aa3d5e4e32b75)
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_device.c2
-rw-r--r--src/intel/vulkan/genX_pipeline.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index f44b046cf5d..f0583d22774 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1068,7 +1068,7 @@ void anv_GetPhysicalDeviceProperties(
16 * devinfo->max_cs_threads,
16 * devinfo->max_cs_threads,
},
- .subPixelPrecisionBits = 4 /* FIXME */,
+ .subPixelPrecisionBits = 8,
.subTexelPrecisionBits = 4 /* FIXME */,
.mipmapPrecisionBits = 4 /* FIXME */,
.maxDrawIndexedIndexValue = UINT32_MAX,
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 2a7044a425e..35f783f786f 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -464,6 +464,7 @@ emit_rs_state(struct anv_pipeline *pipeline,
sf.TriangleStripListProvokingVertexSelect = 0;
sf.LineStripListProvokingVertexSelect = 0;
sf.TriangleFanProvokingVertexSelect = 1;
+ sf.VertexSubPixelPrecisionSelect = _8Bit;
const struct brw_vue_prog_data *last_vue_prog_data =
anv_pipeline_get_last_vue_prog_data(pipeline);
@@ -1077,6 +1078,10 @@ emit_3dstate_clip(struct anv_pipeline *pipeline,
clip.APIMode = APIMODE_D3D,
clip.ViewportXYClipTestEnable = true;
+#if GEN_GEN >= 8
+ clip.VertexSubPixelPrecisionSelect = _8Bit;
+#endif
+
clip.ClipMode = CLIPMODE_NORMAL;
clip.TriangleStripListProvokingVertexSelect = 0;