Transition the initial image layout if TextureUsage::SAMPLEABLE
This commit is contained in:
committed by
Philip Rideout
parent
3e30632b8c
commit
13f3ebca89
@@ -177,7 +177,7 @@ VulkanTexture::VulkanTexture(VulkanContext& context, SamplerType target, uint8_t
|
||||
getImageView(mPrimaryViewRange);
|
||||
|
||||
// Transition the layout of each image slice.
|
||||
if (any(usage & (TextureUsage::COLOR_ATTACHMENT | TextureUsage::DEPTH_ATTACHMENT))) {
|
||||
if (any(usage & (TextureUsage::COLOR_ATTACHMENT | TextureUsage::DEPTH_ATTACHMENT | TextureUsage::SAMPLEABLE))) {
|
||||
const uint32_t layers = mPrimaryViewRange.layerCount;
|
||||
transitionImageLayout(mContext.commands->get().cmdbuffer, textureTransitionHelper({
|
||||
.image = mTextureImage,
|
||||
|
||||
Reference in New Issue
Block a user