Commit 8def9063 by Corentin Wallez Committed by Corentin Wallez

Only call updateBorders on ranges that can be cubemaps.

Bug: dawn:283 Change-Id: I8abd042ce1cb1a278d77b6639aeda650630963a8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41328Tested-by: 's avatarCorentin Wallez <cwallez@google.com> Kokoro-Presubmit: Corentin Wallez <cwallez@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 2883de94
...@@ -990,11 +990,14 @@ void Image::prepareForSampling(const VkImageSubresourceRange &subresourceRange) ...@@ -990,11 +990,14 @@ void Image::prepareForSampling(const VkImageSubresourceRange &subresourceRange)
subresourceRange.baseArrayLayer, subresourceRange.baseArrayLayer,
6 6
}; };
// Update the borders of all the groups of 6 layers that can be part of a cubemaps but don't
// touch leftover layers that cannot be part of cubemaps.
uint32_t lastMipLevel = getLastMipLevel(subresourceRange); uint32_t lastMipLevel = getLastMipLevel(subresourceRange);
for(; subresourceLayers.mipLevel <= lastMipLevel; subresourceLayers.mipLevel++) for(; subresourceLayers.mipLevel <= lastMipLevel; subresourceLayers.mipLevel++)
{ {
for(subresourceLayers.baseArrayLayer = 0; for(subresourceLayers.baseArrayLayer = 0;
subresourceLayers.baseArrayLayer < arrayLayers; subresourceLayers.baseArrayLayer < arrayLayers - 5;
subresourceLayers.baseArrayLayer += 6) subresourceLayers.baseArrayLayer += 6)
{ {
device->getBlitter()->updateBorders(decompressedImage ? decompressedImage : this, subresourceLayers); device->getBlitter()->updateBorders(decompressedImage ? decompressedImage : this, subresourceLayers);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment