Fix uninitialized reftype during image state merge

The reftype of a merged subresource state is now initialized with the reftype of the original subresource state

This resolves an issue that could occur if image states in a secondary command buffer were merged into a primary for the first time, where the resulting merged image state would have an uninitialized reftype
This commit is contained in:
James Sumihiro
2024-09-26 10:18:48 +01:00
committed by Baldur Karlsson
parent f0389a6ccc
commit aaf64f1edf
@@ -50,6 +50,9 @@ void ImageSubresourceState::Update(const ImageSubresourceState &other, FrameRefC
if(other.newLayout != UNKNOWN_PREV_IMG_LAYOUT)
newLayout = other.newLayout;
if(refType == eFrameRef_Unknown)
refType = other.refType;
refType = compose(refType, other.refType);
}