Lines Matching refs:image_state
202 auto image_state = GetImageState(image); in FindLayouts() local
203 if (!image_state) return false; in FindLayouts()
206 …if (sub_data->second.size() >= (image_state->createInfo.arrayLayers * image_state->createInfo.mipL… in FindLayouts()
285 …s::SetImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, const IMAGE_STATE *image_state, in SetImageLayout() argument
287 assert(image_state); in SetImageLayout()
297 if (FormatIsDepthAndStencil(image_state->createInfo.format)) { in SetImageLayout()
303 if (FormatIsMultiplane(image_state->createInfo.format)) { in SetImageLayout()
307 if (FormatPlaneCount(image_state->createInfo.format) > 2) { in SetImageLayout()
313 SetLayout(device_data, cb_node, image_state->image, sub, layout); in SetImageLayout()
318 …s::SetImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, const IMAGE_STATE *image_state, in SetImageLayout() argument
327 SetImageLayout(device_data, cb_node, image_state, image_subresource_range, layout); in SetImageLayout()
335 IMAGE_STATE *image_state = GetImageState(view_state->create_info.image); in SetImageViewLayout() local
340 …if ((image_state->createInfo.imageType == VK_IMAGE_TYPE_3D) && (view_state->create_info.viewType !… in SetImageViewLayout()
342 sub_range.layerCount = image_state->createInfo.extent.depth; in SetImageViewLayout()
345 SetImageLayout(device_data, cb_node, image_state, sub_range, layout); in SetImageViewLayout()
359 auto image_state = GetImageState(image); in ValidateRenderPassLayoutAgainstFramebufferImageUsage() local
363 if (!image_state) { in ValidateRenderPassLayoutAgainstFramebufferImageUsage()
373 auto image_usage = image_state->createInfo.usage; in ValidateRenderPassLayoutAgainstFramebufferImageUsage()
794 auto image_state = GetImageState(img_barrier->image); in ValidateBarriersToImages() local
795 if (image_state) { in ValidateBarriersToImages()
796 VkImageUsageFlags usage_flags = image_state->createInfo.usage; in ValidateBarriersToImages()
801 if (image_state->layout_locked) { in ValidateBarriersToImages()
1119 …ImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_node, IMAGE_STATE *image_state, in VerifyImageLayout() argument
1123 const auto image = image_state->image; in VerifyImageLayout()
1145 if (image_state->createInfo.tiling != VK_IMAGE_TILING_LINEAR) { in VerifyImageLayout()
1154 if (image_state->shared_presentable) { in VerifyImageLayout()
1291 IMAGE_STATE *image_state = GetImageState(create_info->image); in ValidateCreateImageViewANDROID() local
1293 if (image_state->has_ahb_format) { in ValidateCreateImageViewANDROID()
1314 if ((!conv_found) || (external_format != image_state->ahb_format)) { in ValidateCreateImageViewANDROID()
1339 IMAGE_STATE *image_state = GetImageState(image); in ValidateGetImageSubresourceLayoutANDROID() local
1340 if (image_state->imported_ahb && (0 == image_state->GetBoundMemory().size())) { in ValidateGetImageSubresourceLayoutANDROID()
1493 IMAGE_LAYOUT_NODE image_state; in PostCallRecordCreateImage() local
1494 image_state.layout = pCreateInfo->initialLayout; in PostCallRecordCreateImage()
1495 image_state.format = pCreateInfo->format; in PostCallRecordCreateImage()
1503 (*GetImageLayoutMap())[subpair] = image_state; in PostCallRecordCreateImage()
1508 IMAGE_STATE *image_state = GetImageState(image); in PreCallValidateDestroyImage() local
1511 if (image_state) { in PreCallValidateDestroyImage()
1512 …skip |= ValidateObjectNotInUse(device_data, image_state, obj_struct, "vkDestroyImage", "VUID-vkDes… in PreCallValidateDestroyImage()
1520 IMAGE_STATE *image_state = GetImageState(image); in PreCallRecordDestroyImage() local
1522 InvalidateCommandBuffers(device_data, image_state->cb_bindings, obj_struct); in PreCallRecordDestroyImage()
1524 for (auto mem_binding : image_state->GetBoundMemory()) { in PreCallRecordDestroyImage()
1545 bool CoreChecks::ValidateImageAttributes(layer_data *device_data, IMAGE_STATE *image_state, VkImage… in ValidateImageAttributes() argument
1551 … HandleToUint64(image_state->image), kVUID_Core_DrawState_InvalidImageAspect, str); in ValidateImageAttributes()
1554 if (FormatIsDepthOrStencil(image_state->createInfo.format)) { in ValidateImageAttributes()
1557 … HandleToUint64(image_state->image), "VUID-vkCmdClearColorImage-image-00007", "%s.", str); in ValidateImageAttributes()
1558 } else if (FormatIsCompressed(image_state->createInfo.format)) { in ValidateImageAttributes()
1561 … HandleToUint64(image_state->image), "VUID-vkCmdClearColorImage-image-00007", "%s.", str); in ValidateImageAttributes()
1564 if (!(image_state->createInfo.usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT)) { in ValidateImageAttributes()
1567 … HandleToUint64(image_state->image), "VUID-vkCmdClearColorImage-image-00002", "%s.", str); in ValidateImageAttributes()
1590 …:VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IMAGE_STATE *image_state, in VerifyClearImageLayout() argument
1594 uint32_t level_count = ResolveRemainingLevels(&range, image_state->createInfo.mipLevels); in VerifyClearImageLayout()
1595 uint32_t layer_count = ResolveRemainingLayers(&range, image_state->createInfo.arrayLayers); in VerifyClearImageLayout()
1599 if (image_state->createInfo.tiling != VK_IMAGE_TILING_LINEAR) { in VerifyClearImageLayout()
1602 … HandleToUint64(image_state->image), kVUID_Core_DrawState_InvalidImageLayout, in VerifyClearImageLayout()
1609 HandleToUint64(image_state->image), 0, in VerifyClearImageLayout()
1614 if (image_state->shared_presentable) { in VerifyClearImageLayout()
1617 HandleToUint64(image_state->image), 0, in VerifyClearImageLayout()
1630 HandleToUint64(image_state->image), error_code, in VerifyClearImageLayout()
1642 if (FindCmdBufLayout(device_data, cb_node, image_state->image, sub, node)) { in VerifyClearImageLayout()
1689 auto image_state = GetImageState(image); in PreCallValidateCmdClearColorImage() local
1690 if (cb_node && image_state) { in PreCallValidateCmdClearColorImage()
1691 skip |= ValidateMemoryIsBoundToImage(device_data, image_state, "vkCmdClearColorImage()", in PreCallValidateCmdClearColorImage()
1697 …skip |= ValidateImageFormatFeatureFlags(device_data, image_state, VK_FORMAT_FEATURE_TRANSFER_DST_B… in PreCallValidateCmdClearColorImage()
1704 …skip |= ValidateCmdClearColorSubresourceRange(device_data, image_state, pRanges[i], param_name.c_s… in PreCallValidateCmdClearColorImage()
1705 skip |= ValidateImageAttributes(device_data, image_state, pRanges[i]); in PreCallValidateCmdClearColorImage()
1706 …skip |= VerifyClearImageLayout(device_data, cb_node, image_state, pRanges[i], imageLayout, "vkCmdC… in PreCallValidateCmdClearColorImage()
1718 auto image_state = GetImageState(image); in PreCallRecordCmdClearColorImage() local
1719 if (cb_node && image_state) { in PreCallRecordCmdClearColorImage()
1720 AddCommandBufferBindingImage(device_data, cb_node, image_state); in PreCallRecordCmdClearColorImage()
1735 auto image_state = GetImageState(image); in PreCallValidateCmdClearDepthStencilImage() local
1736 if (cb_node && image_state) { in PreCallValidateCmdClearDepthStencilImage()
1737 … skip |= ValidateMemoryIsBoundToImage(device_data, image_state, "vkCmdClearDepthStencilImage()", in PreCallValidateCmdClearDepthStencilImage()
1743 …skip |= ValidateImageFormatFeatureFlags(device_data, image_state, VK_FORMAT_FEATURE_TRANSFER_DST_B… in PreCallValidateCmdClearDepthStencilImage()
1751 …skip |= ValidateCmdClearDepthSubresourceRange(device_data, image_state, pRanges[i], param_name.c_s… in PreCallValidateCmdClearDepthStencilImage()
1753 …VerifyClearImageLayout(device_data, cb_node, image_state, pRanges[i], imageLayout, "vkCmdClearDept… in PreCallValidateCmdClearDepthStencilImage()
1764 if (image_state && !FormatIsDepthOrStencil(image_state->createInfo.format)) { in PreCallValidateCmdClearDepthStencilImage()
1769 …if (VK_IMAGE_USAGE_TRANSFER_DST_BIT != (VK_IMAGE_USAGE_TRANSFER_DST_BIT & image_state->createInfo.… in PreCallValidateCmdClearDepthStencilImage()
1786 auto image_state = GetImageState(image); in PreCallRecordCmdClearDepthStencilImage() local
1787 if (cb_node && image_state) { in PreCallRecordCmdClearDepthStencilImage()
1788 AddCommandBufferBindingImage(device_data, cb_node, image_state); in PreCallRecordCmdClearDepthStencilImage()
3729 bool CoreChecks::ValidateImageUsageFlags(layer_data *device_data, IMAGE_STATE const *image_state, V… in ValidateImageUsageFlags() argument
3731 …return ValidateUsageFlags(device_data, image_state->createInfo.usage, desired, strict, HandleToUin… in ValidateImageUsageFlags()
3735 …lidateImageFormatFeatureFlags(layer_data *dev_data, IMAGE_STATE const *image_state, VkFormatFeatur… in ValidateImageFormatFeatureFlags() argument
3737 VkFormatProperties format_properties = GetPDFormatProperties(image_state->createInfo.format); in ValidateImageFormatFeatureFlags()
3739 if (image_state->createInfo.tiling == VK_IMAGE_TILING_LINEAR) { in ValidateImageFormatFeatureFlags()
3742 HandleToUint64(image_state->image), linear_vuid, in ValidateImageFormatFeatureFlags()
3744 format_properties.linearTilingFeatures, image_state->createInfo.format, in ValidateImageFormatFeatureFlags()
3745 report_data->FormatHandle(image_state->image).c_str()); in ValidateImageFormatFeatureFlags()
3747 } else if (image_state->createInfo.tiling == VK_IMAGE_TILING_OPTIMAL) { in ValidateImageFormatFeatureFlags()
3750 HandleToUint64(image_state->image), optimal_vuid, in ValidateImageFormatFeatureFlags()
3752 format_properties.optimalTilingFeatures, image_state->createInfo.format, in ValidateImageFormatFeatureFlags()
3753 report_data->FormatHandle(image_state->image).c_str()); in ValidateImageFormatFeatureFlags()
4110 …idateCreateImageViewSubresourceRange(const layer_data *device_data, const IMAGE_STATE *image_state, in ValidateCreateImageViewSubresourceRange() argument
4114 bool is_image_slicable = image_state->createInfo.imageType == VK_IMAGE_TYPE_3D && in ValidateCreateImageViewSubresourceRange()
4115 … (image_state->createInfo.flags & VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR); in ValidateCreateImageViewSubresourceRange()
4118 …const auto image_layer_count = is_3D_to_2D_map ? image_state->createInfo.extent.depth : image_stat… in ValidateCreateImageViewSubresourceRange()
4132 …return ValidateImageSubresourceRange(device_data, image_state->createInfo.mipLevels, image_layer_c… in ValidateCreateImageViewSubresourceRange()
4134 … HandleToUint64(image_state->image), subresourceRangeErrorCodes); in ValidateCreateImageViewSubresourceRange()
4137 …alidateCmdClearColorSubresourceRange(const layer_data *device_data, const IMAGE_STATE *image_state, in ValidateCmdClearColorSubresourceRange() argument
4145 …return ValidateImageSubresourceRange(device_data, image_state->createInfo.mipLevels, image_state->… in ValidateCmdClearColorSubresourceRange()
4147 … HandleToUint64(image_state->image), subresourceRangeErrorCodes); in ValidateCmdClearColorSubresourceRange()
4150 …alidateCmdClearDepthSubresourceRange(const layer_data *device_data, const IMAGE_STATE *image_state, in ValidateCmdClearDepthSubresourceRange() argument
4158 …return ValidateImageSubresourceRange(device_data, image_state->createInfo.mipLevels, image_state->… in ValidateCmdClearDepthSubresourceRange()
4160 … HandleToUint64(image_state->image), subresourceRangeErrorCodes); in ValidateCmdClearDepthSubresourceRange()
4163 …ValidateImageBarrierSubresourceRange(const layer_data *device_data, const IMAGE_STATE *image_state, in ValidateImageBarrierSubresourceRange() argument
4172 …return ValidateImageSubresourceRange(device_data, image_state->createInfo.mipLevels, image_state->… in ValidateImageBarrierSubresourceRange()
4173 … subresourceRange, cmd_name, param_name, "arrayLayers", HandleToUint64(image_state->image), in ValidateImageBarrierSubresourceRange()
4181 IMAGE_STATE *image_state = GetImageState(pCreateInfo->image); in PreCallValidateCreateImageView() local
4182 if (image_state) { in PreCallValidateCreateImageView()
4184 device_data, image_state, in PreCallValidateCreateImageView()
4192 …ValidateMemoryIsBoundToImage(device_data, image_state, "vkCreateImageView()", "VUID-VkImageViewCre… in PreCallValidateCreateImageView()
4195 device_data, image_state, in PreCallValidateCreateImageView()
4199 VkImageCreateFlags image_flags = image_state->createInfo.flags; in PreCallValidateCreateImageView()
4200 VkFormat image_format = image_state->createInfo.format; in PreCallValidateCreateImageView()
4201 VkImageUsageFlags image_usage = image_state->createInfo.usage; in PreCallValidateCreateImageView()
4202 VkImageTiling image_tiling = image_state->createInfo.tiling; in PreCallValidateCreateImageView()
4205 VkImageType image_type = image_state->createInfo.imageType; in PreCallValidateCreateImageView()
4284 …skip |= ValidateImageAspectMask(device_data, image_state->image, image_format, aspect_mask, "vkCre… in PreCallValidateCreateImageView()
4419 auto image_state = GetImageState(pCreateInfo->image); in PostCallRecordCreateImageView() local
4421 …sub_res_range.levelCount = ResolveRemainingLevels(&sub_res_range, image_state->createInfo.mipLevel… in PostCallRecordCreateImageView()
4422 …sub_res_range.layerCount = ResolveRemainingLayers(&sub_res_range, image_state->createInfo.arrayLay… in PostCallRecordCreateImageView()
4587 … const VkBufferImageCopy *pRegions, IMAGE_STATE *image_state, const char *function) { in ValidateBufferImageCopyData() argument
4591 if (image_state->createInfo.imageType == VK_IMAGE_TYPE_1D) { in ValidateBufferImageCopyData()
4594 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-srcImage-00199", in ValidateBufferImageCopyData()
4601 …if ((image_state->createInfo.imageType == VK_IMAGE_TYPE_1D) || (image_state->createInfo.imageType … in ValidateBufferImageCopyData()
4604 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-srcImage-00201", in ValidateBufferImageCopyData()
4611 if (image_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { in ValidateBufferImageCopyData()
4614 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-baseArrayLayer-00213", in ValidateBufferImageCopyData()
4623 uint32_t element_size = FormatElementSize(image_state->createInfo.format); in ValidateBufferImageCopyData()
4624 …if (!FormatIsDepthAndStencil(image_state->createInfo.format) && SafeModulo(pRegions[i].bufferOffse… in ValidateBufferImageCopyData()
4626 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferOffset-00193", in ValidateBufferImageCopyData()
4635 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferOffset-00194", in ValidateBufferImageCopyData()
4644 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferRowLength-00195", in ValidateBufferImageCopyData()
4653 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferImageHeight-00196", in ValidateBufferImageCopyData()
4663 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-aspectMask-00212", in ValidateBufferImageCopyData()
4668 …if (!VerifyAspectsPresent(pRegions[i].imageSubresource.aspectMask, image_state->createInfo.format)… in ValidateBufferImageCopyData()
4671 HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-aspectMask-00211", in ValidateBufferImageCopyData()
4673 … function, i, pRegions[i].imageSubresource.aspectMask, image_state->createInfo.format); in ValidateBufferImageCopyData()
4677 …if (FormatIsCompressed(image_state->createInfo.format) || FormatIsSinglePlane_422(image_state->cre… in ValidateBufferImageCopyData()
4678 auto block_size = FormatTexelBlockExtent(image_state->createInfo.format); in ValidateBufferImageCopyData()
4684 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferRowLength-00203", in ValidateBufferImageCopyData()
4693 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferImageHeight-00204", in ValidateBufferImageCopyData()
4704 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-imageOffset-00205", in ValidateBufferImageCopyData()
4711 uint32_t block_size_in_bytes = FormatElementSize(image_state->createInfo.format); in ValidateBufferImageCopyData()
4714 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-bufferOffset-00206", in ValidateBufferImageCopyData()
4721 … VkExtent3D mip_extent = GetImageSubresourceExtent(image_state, &(pRegions[i].imageSubresource)); in ValidateBufferImageCopyData()
4725 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-imageExtent-00207", in ValidateBufferImageCopyData()
4736 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-imageExtent-00208", in ValidateBufferImageCopyData()
4747 … HandleToUint64(image_state->image), "VUID-VkBufferImageCopy-imageExtent-00209", in ValidateBufferImageCopyData()
4759 …teImageBounds(const debug_report_data *report_data, const IMAGE_STATE *image_state, const uint32_t… in ValidateImageBounds() argument
4762 const VkImageCreateInfo *image_info = &(image_state->createInfo); in ValidateImageBounds()
4776 … VkExtent3D image_extent = GetImageSubresourceExtent(image_state, &(pRegions[i].imageSubresource)); in ValidateImageBounds()
4801 …alidateBufferBounds(const debug_report_data *report_data, IMAGE_STATE *image_state, BUFFER_STATE *… in ValidateBufferBounds() argument
4813 …VkDeviceSize unit_size = FormatElementSize(image_state->createInfo.format); // size (bytes) of te… in ValidateBufferBounds()
4819 switch (image_state->createInfo.format) { in ValidateBufferBounds()
4835 …if (FormatIsCompressed(image_state->createInfo.format) || FormatIsSinglePlane_422(image_state->cre… in ValidateBufferBounds()
4837 auto block_dim = FormatTexelBlockExtent(image_state->createInfo.format); in ValidateBufferBounds()