Mesa (master): anv: Advertise vertexPipelineStoresAndAtomics based on scalar stages

Jason Ekstrand jekstrand at kemper.freedesktop.org
Fri Apr 15 21:54:37 UTC 2016


Module: Mesa
Branch: master
Commit: 5ec4ecce44cfcce67391a25884bd0ef665957398
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ec4ecce44cfcce67391a25884bd0ef665957398

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Apr 15 14:53:16 2016 -0700

anv: Advertise vertexPipelineStoresAndAtomics based on scalar stages

Previously, we just looked at the hardware generation but this meant that
if you did INTEL_DEBUG=vec4 on BDW or SKL, you would have advertised but
non-working features.

---

 src/intel/vulkan/anv_device.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 01d3c99..57c40f5 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -385,7 +385,6 @@ void anv_GetPhysicalDeviceFeatures(
       .textureCompressionBC                     = true,
       .occlusionQueryPrecise                    = true,
       .pipelineStatisticsQuery                  = false,
-      .vertexPipelineStoresAndAtomics           = pdevice->info->gen >= 8,
       .fragmentStoresAndAtomics                 = true,
       .shaderTessellationAndGeometryPointSize   = true,
       .shaderImageGatherExtended                = true,
@@ -406,6 +405,11 @@ void anv_GetPhysicalDeviceFeatures(
       .variableMultisampleRate                  = false,
       .inheritedQueries                         = false,
    };
+
+   /* We can't do image stores in vec4 shaders */
+   pFeatures->vertexPipelineStoresAndAtomics =
+      !pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
+      !pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
 }
 
 void




More information about the mesa-commit mailing list