Skip to content

Commit

Permalink
vulkan: fix validation error when creating a non-square array texture.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed May 5, 2024
1 parent 03f364e commit 9473c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/graphics/vulkan/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool Texture::loadVolatile()
}
}

if (texType == TEXTURE_CUBE || (texType == TEXTURE_2D_ARRAY && layerCount >= 6))
if (texType == TEXTURE_CUBE || (texType == TEXTURE_2D_ARRAY && layerCount >= 6 && pixelWidth == pixelHeight))
createFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;

msaaSamples = vgfx->getMsaaCount(requestedMSAA);
Expand Down

0 comments on commit 9473c8d

Please sign in to comment.