Skip to content

Commit 06781ef

Browse files
committed
Added a comment
1 parent 68ea3c3 commit 06781ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nbl/video/utilities/ImageRegionIterator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ImageRegionIterator::ImageRegionIterator(
6767
asset::ICPUImage::SCreationParams inCPUImageParams = dstImageParams;
6868
inCPUImageParams.flags = asset::IImage::ECF_NONE; // Because we may want to write to first few layers of CUBEMAP (<6) but it's not valid to create an Cube ICPUImage with less that 6 layers.
6969
inCPUImageParams.format = srcImageFormat;
70-
inCPUImageParams.viewFormats.reset();
70+
inCPUImageParams.viewFormats.reset(); // Resetting viewFormats to 0 since all flags were reset earlier, setting flags to ECF_NONE and not resetting viewFormats may cause validation errors during ICPUImage creation
7171
inCPUImageParams.extent = region.imageExtent;
7272
inCPUImageParams.arrayLayers = region.imageSubresource.layerCount;
7373
inCPUImageParams.mipLevels = 1u; // since we copy one mip at a time to our dst image, it doesn't matter at the stage when we copy from cpu memory to staging memory
@@ -105,7 +105,7 @@ ImageRegionIterator::ImageRegionIterator(
105105

106106
asset::ICPUImage::SCreationParams outCPUImageParams = dstImageParams;
107107
outCPUImageParams.flags = asset::IImage::ECF_NONE; // Because we may want to write to first few layers of CUBEMAP (<6) but it's not valid to create an Cube ICPUImage with less that 6 layers.
108-
outCPUImageParams.viewFormats.reset();
108+
outCPUImageParams.viewFormats.reset(); // Resetting viewFormats to 0 since all flags were reset earlier, setting flags to ECF_NONE and not resetting viewFormats may cause validation errors during ICPUImage creation
109109
outCPUImageParams.extent = region.imageExtent;
110110
outCPUImageParams.arrayLayers = region.imageSubresource.layerCount;
111111
outCPUImageParams.mipLevels = 1u;

0 commit comments

Comments
 (0)