Skip to content

Commit

Permalink
syncval: Restore byte accurate linear images
Browse files Browse the repository at this point in the history
All images were being treated as opaque (non-linear) accidentally.
Restored implementation derived parameterizations.

Restores workaround for unsupported features in MockICD.
  • Loading branch information
jzulauf-lunarg committed Jul 5, 2023
1 parent f819984 commit 87403b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layers/containers/subresource_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ ImageRangeEncoder::ImageRangeEncoder(const IMAGE_STATE& image, const AspectParam
VkImageSubresourceLayers subres_layers = {limits_.aspectMask, 0, 0, limits_.arrayLayer};
linear_image_ = false;

// WORKAROUND for profile and mock_icd not containing valid VkSubresourceLayout yet. Treat it as optimal image.
if (image.createInfo.tiling == VK_IMAGE_TILING_LINEAR) {
subres = {static_cast<VkImageAspectFlags>(AspectBit(0)), 0, 0};
DispatchGetImageSubresourceLayout(image.store_device_as_workaround, image.image(), &subres, &layout);
if (layout.size > 0) {
linear_image_ = true;
}
}

is_compressed_ = FormatIsCompressed(image.createInfo.format);
texel_extent_ = FormatTexelBlockExtent(image.createInfo.format);

Expand Down

0 comments on commit 87403b5

Please sign in to comment.