nv50/ir: silence unsupported TGSI_PROPERTY_CS_FIXED_BLOCK_*
[mesa.git] / src / intel / vulkan / anv_device.c
index 54a1f1274ab417ee7ad92a8bce85a0cc2bec9ff2..02b96ca3d691f3ca380478c1ffb728d77f381e05 100644 (file)
@@ -99,6 +99,17 @@ anv_physical_device_init(struct anv_physical_device *device,
       goto fail;
    }
 
+   device->cmd_parser_version = -1;
+   if (device->info->gen == 7) {
+      device->cmd_parser_version =
+         anv_gem_get_param(fd, I915_PARAM_CMD_PARSER_VERSION);
+      if (device->cmd_parser_version == -1) {
+         result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
+                            "failed to get command parser version");
+         goto fail;
+      }
+   }
+
    if (anv_gem_get_aperture(fd, &device->aperture_size) == -1) {
       result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
                          "failed to get aperture size: %m");
@@ -159,11 +170,13 @@ static const VkExtensionProperties global_extensions[] = {
       .extensionName = VK_KHR_SURFACE_EXTENSION_NAME,
       .specVersion = 25,
    },
+#ifdef VK_USE_PLATFORM_XCB_KHR
    {
       .extensionName = VK_KHR_XCB_SURFACE_EXTENSION_NAME,
       .specVersion = 5,
    },
-#ifdef HAVE_WAYLAND_PLATFORM
+#endif
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
    {
       .extensionName = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
       .specVersion = 4,
@@ -369,12 +382,12 @@ void anv_GetPhysicalDeviceFeatures(
       .alphaToOne                               = true,
       .multiViewport                            = true,
       .samplerAnisotropy                        = false, /* FINISHME */
-      .textureCompressionETC2                   = true,
-      .textureCompressionASTC_LDR               = true,
+      .textureCompressionETC2                   = pdevice->info->gen >= 8 ||
+                                                  pdevice->info->is_baytrail,
+      .textureCompressionASTC_LDR               = false, /* FINISHME */
       .textureCompressionBC                     = true,
       .occlusionQueryPrecise                    = true,
       .pipelineStatisticsQuery                  = false,
-      .vertexPipelineStoresAndAtomics           = pdevice->info->gen >= 8,
       .fragmentStoresAndAtomics                 = true,
       .shaderTessellationAndGeometryPointSize   = true,
       .shaderImageGatherExtended                = true,
@@ -395,6 +408,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
@@ -1066,8 +1084,8 @@ VkResult anv_DeviceWaitIdle(
    batch.start = batch.next = cmds;
    batch.end = (void *) cmds + sizeof(cmds);
 
-   anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END);
-   anv_batch_emit(&batch, GEN7_MI_NOOP);
+   anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END, bbe);
+   anv_batch_emit(&batch, GEN7_MI_NOOP, noop);
 
    return anv_device_submit_simple_batch(device, &batch);
 }
@@ -1408,8 +1426,8 @@ VkResult anv_CreateFence(
    const uint32_t batch_offset = align_u32(sizeof(*fence), CACHELINE_SIZE);
    batch.next = batch.start = fence->bo.map + batch_offset;
    batch.end = fence->bo.map + fence->bo.size;
-   anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END);
-   anv_batch_emit(&batch, GEN7_MI_NOOP);
+   anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END, bbe);
+   anv_batch_emit(&batch, GEN7_MI_NOOP, noop);
 
    if (!device->info.has_llc) {
       assert(((uintptr_t) batch.start & CACHELINE_MASK) == 0);