typedef struct VkImageFormatProperties {
VkExtent3D maxExtent;
uint32_t maxMipLevels;
- uint32_t maxArraySize;
+ uint32_t maxArrayLayers;
VkSampleCountFlags sampleCounts;
VkDeviceSize maxResourceSize;
} VkImageFormatProperties;
typedef struct VkMappedMemoryRange {
VkStructureType sType;
const void* pNext;
- VkDeviceMemory mem;
+ VkDeviceMemory memory;
VkDeviceSize offset;
VkDeviceSize size;
} VkMappedMemoryRange;
const void* pNext;
VkQueryPoolCreateFlags flags;
VkQueryType queryType;
- uint32_t slots;
+ uint32_t entryCount;
VkQueryPipelineStatisticFlags pipelineStatistics;
} VkQueryPoolCreateInfo;
VkDeviceSize size;
VkBufferUsageFlags usage;
VkSharingMode sharingMode;
- uint32_t queueFamilyCount;
+ uint32_t queueFamilyIndexCount;
const uint32_t* pQueueFamilyIndices;
} VkBufferCreateInfo;
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;
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 {
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 {
typedef struct VkCommandPoolCreateInfo {
VkStructureType sType;
const void* pNext;
- uint32_t queueFamilyIndex;
VkCommandPoolCreateFlags flags;
+ uint32_t queueFamilyIndex;
} VkCommandPoolCreateInfo;
typedef struct {
.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,
.subresourceRange = (VkImageSubresourceRange) {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1,
+ .layerCount = 1,
},
}});
*pImageFormatProperties = (VkImageFormatProperties) {
.maxExtent = maxExtent,
.maxMipLevels = maxMipLevels,
- .maxArraySize = maxArraySize,
+ .maxArrayLayers = maxArraySize,
/* FINISHME: Support multisampling */
.sampleCounts = VK_SAMPLE_COUNT_1_BIT,
*pImageFormatProperties = (VkImageFormatProperties) {
.maxExtent = { 0, 0, 0 },
.maxMipLevels = 0,
- .maxArraySize = 0,
+ .maxArrayLayers = 0,
.sampleCounts = 0,
.maxResourceSize = 0,
};
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 =
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);
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;
/* 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
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 |
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;
}
.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,
.depth = 1,
},
.mipLevels = 1,
- .arraySize = 1,
+ .arrayLayers = 1,
.samples = 1,
.tiling = VK_IMAGE_TILING_LINEAR,
.usage = 0,
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1,
+ .layerCount = 1,
},
},
cmd_buffer);
.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);
.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);
.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);
.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);
.format = format,
.extent = extent,
.mipLevels = 1,
- .arraySize = 1,
+ .arrayLayers = 1,
.samples = 1,
.tiling = VK_IMAGE_TILING_LINEAR,
.usage = usage,
.subresourceRange = {
.aspectMask = proxy_aspect,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1,
+ .layerCount = 1,
},
},
cmd_buffer);
.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);
.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);
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
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) {
.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);
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;
.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,
.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,
};
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;
}
* 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);
* 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:
*
* 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);