vk/0.210.0: More structure field renaming
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 1 Dec 2015 20:52:56 +0000 (12:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 3 Dec 2015 21:43:53 +0000 (13:43 -0800)
12 files changed:
include/vulkan/vulkan.h
src/vulkan/anv_dump.c
src/vulkan/anv_formats.c
src/vulkan/anv_image.c
src/vulkan/anv_intel.c
src/vulkan/anv_meta.c
src/vulkan/anv_meta_clear.c
src/vulkan/anv_query.c
src/vulkan/anv_wsi_wayland.c
src/vulkan/anv_wsi_x11.c
src/vulkan/gen7_state.c
src/vulkan/gen8_state.c

index cae02065ad1e3ad7aa662a28a1c8c6196d50a7e7..cdf491cfba91ead375aca94e800f17db2dc0b4a3 100644 (file)
@@ -1172,7 +1172,7 @@ typedef struct VkExtent3D {
 typedef struct VkImageFormatProperties {
     VkExtent3D                                  maxExtent;
     uint32_t                                    maxMipLevels;
-    uint32_t                                    maxArraySize;
+    uint32_t                                    maxArrayLayers;
     VkSampleCountFlags                          sampleCounts;
     VkDeviceSize                                maxResourceSize;
 } VkImageFormatProperties;
@@ -1363,7 +1363,7 @@ typedef struct {
 typedef struct VkMappedMemoryRange {
     VkStructureType                             sType;
     const void*                                 pNext;
-    VkDeviceMemory                              mem;
+    VkDeviceMemory                              memory;
     VkDeviceSize                                offset;
     VkDeviceSize                                size;
 } VkMappedMemoryRange;
@@ -1473,7 +1473,7 @@ typedef struct VkQueryPoolCreateInfo {
     const void*                                 pNext;
     VkQueryPoolCreateFlags                      flags;
     VkQueryType                                 queryType;
-    uint32_t                                    slots;
+    uint32_t                                    entryCount;
     VkQueryPipelineStatisticFlags               pipelineStatistics;
 } VkQueryPoolCreateInfo;
 
@@ -1484,7 +1484,7 @@ typedef struct VkBufferCreateInfo {
     VkDeviceSize                                size;
     VkBufferUsageFlags                          usage;
     VkSharingMode                               sharingMode;
-    uint32_t                                    queueFamilyCount;
+    uint32_t                                    queueFamilyIndexCount;
     const uint32_t*                             pQueueFamilyIndices;
 } VkBufferCreateInfo;
 
@@ -1506,12 +1506,12 @@ typedef struct VkImageCreateInfo {
     VkFormat                                    format;
     VkExtent3D                                  extent;
     uint32_t                                    mipLevels;
-    uint32_t                                    arraySize;
+    uint32_t                                    arrayLayers;
     uint32_t                                    samples;
     VkImageTiling                               tiling;
     VkImageUsageFlags                           usage;
     VkSharingMode                               sharingMode;
-    uint32_t                                    queueFamilyCount;
+    uint32_t                                    queueFamilyIndexCount;
     const uint32_t*                             pQueueFamilyIndices;
     VkImageLayout                               initialLayout;
 } VkImageCreateInfo;
@@ -1533,9 +1533,9 @@ typedef struct VkComponentMapping {
 typedef struct VkImageSubresourceRange {
     VkImageAspectFlags                          aspectMask;
     uint32_t                                    baseMipLevel;
-    uint32_t                                    mipLevels;
+    uint32_t                                    levelCount;
     uint32_t                                    baseArrayLayer;
-    uint32_t                                    arraySize;
+    uint32_t                                    layerCount;
 } VkImageSubresourceRange;
 
 typedef struct VkImageViewCreateInfo {
@@ -1570,9 +1570,8 @@ typedef struct VkPipelineCacheCreateInfo {
     VkStructureType                             sType;
     const void*                                 pNext;
     VkPipelineCacheCreateFlags                  flags;
-    size_t                                      initialSize;
-    const void*                                 initialData;
-    size_t                                      maxSize;
+    size_t                                      initialDataSize;
+    const void*                                 pInitialData;
 } VkPipelineCacheCreateInfo;
 
 typedef struct VkSpecializationMapEntry {
@@ -1962,8 +1961,8 @@ typedef struct VkRenderPassCreateInfo {
 typedef struct VkCommandPoolCreateInfo {
     VkStructureType                             sType;
     const void*                                 pNext;
-    uint32_t                                    queueFamilyIndex;
     VkCommandPoolCreateFlags                    flags;
+    uint32_t                                    queueFamilyIndex;
 } VkCommandPoolCreateInfo;
 
 typedef struct {
index b232f6b206bdb020ad9c96b35f659b3dd1880b83..80d9fcec88f020c94d65b4a7ee1ae5dcc2bf5808 100644 (file)
@@ -49,7 +49,7 @@ anv_dump_image_to_ppm(struct anv_device *device,
          .format = VK_FORMAT_R8G8B8A8_UNORM,
          .extent = (VkExtent3D) { extent.width, extent.height, 1 },
          .mipLevels = 1,
-         .arraySize = 1,
+         .arrayLayers = 1,
          .samples = 1,
          .tiling = VK_IMAGE_TILING_LINEAR,
          .usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT,
@@ -144,9 +144,9 @@ anv_dump_image_to_ppm(struct anv_device *device,
          .subresourceRange = (VkImageSubresourceRange) {
             .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
             .baseMipLevel = 0,
-            .mipLevels = 1,
+            .levelCount = 1,
             .baseArrayLayer = 0,
-            .arraySize = 1,
+            .layerCount = 1,
          },
       }});
 
index 8afef443696961514b9fd4739db1e863fa90869d..e79a7105d7d2d4bcd4d6595caa3679fc4abfc244 100644 (file)
@@ -432,7 +432,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
    *pImageFormatProperties = (VkImageFormatProperties) {
       .maxExtent = maxExtent,
       .maxMipLevels = maxMipLevels,
-      .maxArraySize = maxArraySize,
+      .maxArrayLayers = maxArraySize,
 
       /* FINISHME: Support multisampling */
       .sampleCounts = VK_SAMPLE_COUNT_1_BIT,
@@ -449,7 +449,7 @@ unsupported:
    *pImageFormatProperties = (VkImageFormatProperties) {
       .maxExtent = { 0, 0, 0 },
       .maxMipLevels = 0,
-      .maxArraySize = 0,
+      .maxArrayLayers = 0,
       .sampleCounts = 0,
       .maxResourceSize = 0,
    };
index 6c39b355958a4464ff149a4a1c8dfdc2e2cad71d..f52bf456d1e76e06fe26d58316e23e954b11d68b 100644 (file)
@@ -151,7 +151,7 @@ anv_image_make_surface(const struct anv_device *dev,
 
    const VkExtent3D *restrict extent = &create_info->vk_info->extent;
    const uint32_t levels = create_info->vk_info->mipLevels;
-   const uint32_t array_size = create_info->vk_info->arraySize;
+   const uint32_t array_size = create_info->vk_info->arrayLayers;
    const enum isl_tiling tiling = anv_image_choose_tiling(create_info);
 
    const struct anv_tile_info *tile_info =
@@ -303,7 +303,7 @@ anv_image_create(VkDevice _device,
    assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO);
 
    anv_assert(pCreateInfo->mipLevels > 0);
-   anv_assert(pCreateInfo->arraySize > 0);
+   anv_assert(pCreateInfo->arrayLayers > 0);
    anv_assert(pCreateInfo->samples == 1);
    anv_assert(pCreateInfo->extent.width > 0);
    anv_assert(pCreateInfo->extent.height > 0);
@@ -331,7 +331,7 @@ anv_image_create(VkDevice _device,
    image->extent = pCreateInfo->extent;
    image->format = anv_format_for_vk_format(pCreateInfo->format);
    image->levels = pCreateInfo->mipLevels;
-   image->array_size = pCreateInfo->arraySize;
+   image->array_size = pCreateInfo->arrayLayers;
    image->usage = anv_image_get_full_usage(pCreateInfo);
    image->surface_type = surf_type;
 
@@ -487,17 +487,17 @@ anv_validate_CreateImageView(VkDevice _device,
 
    /* Validate subresource. */
    assert(subresource->aspectMask != 0);
-   assert(subresource->mipLevels > 0);
-   assert(subresource->arraySize > 0);
+   assert(subresource->levelCount > 0);
+   assert(subresource->layerCount > 0);
    assert(subresource->baseMipLevel < image->levels);
-   assert(subresource->baseMipLevel + subresource->mipLevels <= image->levels);
+   assert(subresource->baseMipLevel + subresource->levelCount <= image->levels);
    assert(subresource->baseArrayLayer < image->array_size);
-   assert(subresource->baseArrayLayer + subresource->arraySize <= image->array_size);
+   assert(subresource->baseArrayLayer + subresource->layerCount <= image->array_size);
    assert(pView);
 
    if (view_info->is_cube) {
       assert(subresource->baseArrayLayer % 6 == 0);
-      assert(subresource->arraySize % 6 == 0);
+      assert(subresource->layerCount % 6 == 0);
    }
 
    const VkImageAspectFlags ds_flags = VK_IMAGE_ASPECT_DEPTH_BIT
@@ -543,7 +543,7 @@ anv_image_view_init(struct anv_image_view *iview,
    ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
    const VkImageSubresourceRange *range = &pCreateInfo->subresourceRange;
 
-   assert(range->arraySize > 0);
+   assert(range->layerCount > 0);
    assert(range->baseMipLevel < image->levels);
    assert(image->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
                           VK_IMAGE_USAGE_STORAGE_BIT |
@@ -555,10 +555,10 @@ anv_image_view_init(struct anv_image_view *iview,
       unreachable("bad VkImageType");
    case VK_IMAGE_TYPE_1D:
    case VK_IMAGE_TYPE_2D:
-      assert(range->baseArrayLayer + range->arraySize - 1 <= image->array_size);
+      assert(range->baseArrayLayer + range->layerCount - 1 <= image->array_size);
       break;
    case VK_IMAGE_TYPE_3D:
-      assert(range->baseArrayLayer + range->arraySize - 1
+      assert(range->baseArrayLayer + range->layerCount - 1
              <= anv_minify(image->extent.depth, range->baseMipLevel));
       break;
    }
index 48ac183ad79b286401b775d7fd010d68f9af652e..5507bf2d5cb6c39ecef4584edbcbf8f8629c25e8 100644 (file)
@@ -78,7 +78,7 @@ VkResult anv_CreateDmaBufImageINTEL(
          .format = pCreateInfo->format,
          .extent = pCreateInfo->extent,
          .mipLevels = 1,
-         .arraySize = 1,
+         .arrayLayers = 1,
          .samples = 1,
          /* FIXME: Need a way to use X tiling to allow scanout */
          .tiling = VK_IMAGE_TILING_OPTIMAL,
index a2626a0f63e31871115c933d56762cb730c6bd04..419667a9f306d1f3477a867c83d13a8a5be0d108 100644 (file)
@@ -674,7 +674,7 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
          .depth = 1,
       },
       .mipLevels = 1,
-      .arraySize = 1,
+      .arrayLayers = 1,
       .samples = 1,
       .tiling = VK_IMAGE_TILING_LINEAR,
       .usage = 0,
@@ -707,9 +707,9 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
          .subresourceRange = {
             .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
             .baseMipLevel = 0,
-            .mipLevels = 1,
+            .levelCount = 1,
             .baseArrayLayer = 0,
-            .arraySize = 1
+            .layerCount = 1
          },
       },
       cmd_buffer);
@@ -724,9 +724,9 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
          .subresourceRange = {
             .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
             .baseMipLevel = 0,
-            .mipLevels = 1,
+            .levelCount = 1,
             .baseArrayLayer = 0,
-            .arraySize = 1,
+            .layerCount = 1,
          },
       },
       cmd_buffer);
@@ -855,9 +855,9 @@ void anv_CmdCopyImage(
             .subresourceRange = {
                .aspectMask = pRegions[r].srcSubresource.aspectMask,
                .baseMipLevel = pRegions[r].srcSubresource.mipLevel,
-               .mipLevels = 1,
+               .levelCount = 1,
                .baseArrayLayer = pRegions[r].srcSubresource.baseArrayLayer,
-               .arraySize = pRegions[r].dstSubresource.layerCount,
+               .layerCount = pRegions[r].dstSubresource.layerCount,
             },
          },
          cmd_buffer);
@@ -899,9 +899,9 @@ void anv_CmdCopyImage(
                .subresourceRange = {
                   .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
                   .baseMipLevel = pRegions[r].dstSubresource.mipLevel,
-                  .mipLevels = 1,
+                  .levelCount = 1,
                   .baseArrayLayer = dest_base_array_slice + slice,
-                  .arraySize = 1
+                  .layerCount = 1
                },
             },
             cmd_buffer);
@@ -955,9 +955,9 @@ void anv_CmdBlitImage(
             .subresourceRange = {
                .aspectMask = pRegions[r].srcSubresource.aspectMask,
                .baseMipLevel = pRegions[r].srcSubresource.mipLevel,
-               .mipLevels = 1,
+               .levelCount = 1,
                .baseArrayLayer = pRegions[r].srcSubresource.baseArrayLayer,
-               .arraySize = 1
+               .layerCount = 1
             },
          },
          cmd_buffer);
@@ -989,9 +989,9 @@ void anv_CmdBlitImage(
             .subresourceRange = {
                .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
                .baseMipLevel = pRegions[r].dstSubresource.mipLevel,
-               .mipLevels = 1,
+               .levelCount = 1,
                .baseArrayLayer = dest_array_slice,
-               .arraySize = 1
+               .layerCount = 1
             },
          },
          cmd_buffer);
@@ -1032,7 +1032,7 @@ make_image_for_buffer(VkDevice vk_device, VkBuffer vk_buffer, VkFormat format,
          .format = format,
          .extent = extent,
          .mipLevels = 1,
-         .arraySize = 1,
+         .arrayLayers = 1,
          .samples = 1,
          .tiling = VK_IMAGE_TILING_LINEAR,
          .usage = usage,
@@ -1106,9 +1106,9 @@ void anv_CmdCopyBufferToImage(
                .subresourceRange = {
                   .aspectMask = proxy_aspect,
                   .baseMipLevel = 0,
-                  .mipLevels = 1,
+                  .levelCount = 1,
                   .baseArrayLayer = 0,
-                  .arraySize = 1,
+                  .layerCount = 1,
                },
             },
             cmd_buffer);
@@ -1123,9 +1123,9 @@ void anv_CmdCopyBufferToImage(
                .subresourceRange = {
                   .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
                   .baseMipLevel = pRegions[r].imageSubresource.mipLevel,
-                  .mipLevels = 1,
+                  .levelCount = 1,
                   .baseArrayLayer = dest_base_array_slice + slice,
-                  .arraySize = 1
+                  .layerCount = 1
                },
             },
             cmd_buffer);
@@ -1194,9 +1194,9 @@ void anv_CmdCopyImageToBuffer(
             .subresourceRange = {
                .aspectMask = pRegions[r].imageSubresource.aspectMask,
                .baseMipLevel = pRegions[r].imageSubresource.mipLevel,
-               .mipLevels = 1,
+               .levelCount = 1,
                .baseArrayLayer = pRegions[r].imageSubresource.baseArrayLayer,
-               .arraySize = pRegions[r].imageSubresource.layerCount,
+               .layerCount = pRegions[r].imageSubresource.layerCount,
             },
          },
          cmd_buffer);
@@ -1234,9 +1234,9 @@ void anv_CmdCopyImageToBuffer(
                .subresourceRange = {
                   .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
                   .baseMipLevel = 0,
-                  .mipLevels = 1,
+                  .levelCount = 1,
                   .baseArrayLayer = 0,
-                  .arraySize = 1
+                  .layerCount = 1
                },
             },
             cmd_buffer);
index 27c6a2919679998855acb9373e038f9197ed97e0..0531eccad9ba86a6562cd3975d8b1f3363d9694b 100644 (file)
@@ -690,8 +690,8 @@ void anv_CmdClearColorImage(
    meta_clear_begin(&saved_state, cmd_buffer);
 
    for (uint32_t r = 0; r < rangeCount; r++) {
-      for (uint32_t l = 0; l < pRanges[r].mipLevels; l++) {
-         for (uint32_t s = 0; s < pRanges[r].arraySize; s++) {
+      for (uint32_t l = 0; l < pRanges[r].levelCount; l++) {
+         for (uint32_t s = 0; s < pRanges[r].layerCount; s++) {
             struct anv_image_view iview;
             anv_image_view_init(&iview, cmd_buffer->device,
                &(VkImageViewCreateInfo) {
@@ -702,9 +702,9 @@ void anv_CmdClearColorImage(
                   .subresourceRange = {
                      .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
                      .baseMipLevel = pRanges[r].baseMipLevel + l,
-                     .mipLevels = 1,
+                     .levelCount = 1,
                      .baseArrayLayer = pRanges[r].baseArrayLayer + s,
-                     .arraySize = 1
+                     .layerCount = 1
                   },
                },
                cmd_buffer);
index 8891aa02d76f2204fe5aa02339792b288e0a243d..7aa54363aee3dd14716d5b53ae2c112a0db6d90d 100644 (file)
@@ -55,7 +55,7 @@ VkResult anv_CreateQueryPool(
    if (pool == NULL)
       return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
 
-   size = pCreateInfo->slots * sizeof(struct anv_query_pool_slot);
+   size = pCreateInfo->entryCount * sizeof(struct anv_query_pool_slot);
    result = anv_bo_init_new(&pool->bo, device, size);
    if (result != VK_SUCCESS)
       goto fail;
index d226c8d06c1418b0a09e8eb700c55607e9fcbcaf..581c8a0e90ccb7250f97354e6a4f1e5edc0f4ad2 100644 (file)
@@ -561,7 +561,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, struct wsi_wl_image *image)
             .depth = 1
          },
          .mipLevels = 1,
-         .arraySize = 1,
+         .arrayLayers = 1,
          .samples = 1,
          /* FIXME: Need a way to use X tiling to allow scanout */
          .tiling = VK_IMAGE_TILING_OPTIMAL,
index 4beffce3ce5cee55dd4bb9555544e3c6287ffa72..1ab31c525738c306b12719e32f07df6f6c7889e2 100644 (file)
@@ -313,7 +313,7 @@ x11_create_swapchain(struct anv_wsi_implementation *impl,
                .depth = 1
             },
             .mipLevels = 1,
-            .arraySize = 1,
+            .arrayLayers = 1,
             .samples = 1,
             /* FIXME: Need a way to use X tiling to allow scanout */
             .tiling = VK_IMAGE_TILING_OPTIMAL,
index a30de3487321ba44e6062ca09f02a274a568d3c0..e4cf552f90d3bef36efa83b62d56fe8e16a8a26c 100644 (file)
@@ -231,8 +231,8 @@ genX(image_view_init)(struct anv_image_view *iview,
    };
 
    uint32_t depth = 1;
-   if (range->arraySize > 1) {
-      depth = range->arraySize;
+   if (range->layerCount > 1) {
+      depth = range->layerCount;
    } else if (image->extent.depth > 1) {
       depth = image->extent.depth;
    }
@@ -300,7 +300,7 @@ genX(image_view_init)(struct anv_image_view *iview,
        * sampler engine is [SurfaceMinLOD, SurfaceMinLOD + MIPCountLOD].
        */
       surface_state.SurfaceMinLOD = range->baseMipLevel;
-      surface_state.MIPCountLOD = range->mipLevels - 1;
+      surface_state.MIPCountLOD = range->levelCount - 1;
 
       GENX(RENDER_SURFACE_STATE_pack)(NULL, iview->nonrt_surface_state.map,
                                       &surface_state);
index 092e1ae78227e4bb92a5a48a20063ef9bc86ae81..02394dc6f61b77325adb1a8034c1bb970f530f95 100644 (file)
@@ -145,7 +145,7 @@ genX(image_view_init)(struct anv_image_view *iview,
        *    example, if Minimum Array Element is set to 1024 on a 2D surface,
        *    the range of this field is reduced to [0,1023].
        */
-      depth = range->arraySize;
+      depth = range->layerCount;
 
       /* From the Broadwell PRM >> RENDER_SURFACE_STATE::RenderTargetViewExtent:
        *
@@ -242,7 +242,7 @@ genX(image_view_init)(struct anv_image_view *iview,
        * sampler engine is [SurfaceMinLOD, SurfaceMinLOD + MIPCountLOD].
        */
       surface_state.SurfaceMinLOD = range->baseMipLevel;
-      surface_state.MIPCountLOD = range->mipLevels - 1;
+      surface_state.MIPCountLOD = range->levelCount - 1;
 
       GENX(RENDER_SURFACE_STATE_pack)(NULL, iview->nonrt_surface_state.map,
                                       &surface_state);