vk: Fill out buffer surface state when updating descriptor set
[mesa.git] / src / vulkan / anv_device.c
index 746fecb760f172cb08c2e8cc1057e5e2aab9d74a..88515c353eea5fbb00054409ea004ae4911933ef 100644 (file)
@@ -119,7 +119,8 @@ anv_physical_device_init(struct anv_physical_device *device,
       goto fail;
    }
 
-   if (anv_gem_get_param(fd, I915_PARAM_MMAP_VERSION) < 1) {
+   if (!device->info->has_llc &&
+       anv_gem_get_param(fd, I915_PARAM_MMAP_VERSION) < 1) {
       result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
                          "kernel missing wc mmap");
       goto fail;
@@ -705,6 +706,9 @@ VkResult anv_CreateDevice(
    if (device->context_id == -1)
       goto fail_fd;
 
+   device->info = *physical_device->info;
+   device->isl_dev = physical_device->isl_dev;
+
    pthread_mutex_init(&device->mutex, NULL);
 
    anv_bo_pool_init(&device->batch_bo_pool, device, ANV_CMD_BUFFER_BATCH_SIZE);
@@ -724,9 +728,6 @@ VkResult anv_CreateDevice(
 
    anv_block_pool_init(&device->scratch_block_pool, device, 0x10000);
 
-   device->info = *physical_device->info;
-   device->isl_dev = physical_device->isl_dev;
-
    anv_queue_init(device, &device->queue);
 
    anv_device_init_meta(device);
@@ -1428,8 +1429,13 @@ VkResult anv_CreateSemaphore(
     const VkAllocationCallbacks*                pAllocator,
     VkSemaphore*                                pSemaphore)
 {
+   /* The DRM execbuffer ioctl always execute in-oder, even between different
+    * rings. As such, there's nothing to do for the user space semaphore.
+    */
+
    *pSemaphore = (VkSemaphore)1;
-   stub_return(VK_SUCCESS);
+
+   return VK_SUCCESS;
 }
 
 void anv_DestroySemaphore(
@@ -1437,7 +1443,6 @@ void anv_DestroySemaphore(
     VkSemaphore                                 semaphore,
     const VkAllocationCallbacks*                pAllocator)
 {
-   stub();
 }
 
 // Event functions