Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
VideoRenderer crash on texture update
Browse files Browse the repository at this point in the history
- Pass the 2DRHI texture sizes when updating
- It seems like this what is described
  -> Where the passed ref could have different bounds then the sizes
  • Loading branch information
djova-dolby committed Oct 10, 2023
1 parent 16e57ce commit b0c36a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DolbyIO/Source/Private/Video/DolbyIOVideoTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ namespace DolbyIO
[SharedThis = AsShared()](FRHICommandListImmediate& RHICmdList)
{
FScopeLock Lock{SharedThis->GetBufferLock()};
RHIUpdateTexture2D(SharedThis->Texture->GetResource()->GetTexture2DRHI(), 0,
FUpdateTextureRegion2D{0, 0, 0, 0,
static_cast<uint32>(SharedThis->Texture->GetSizeX()),
static_cast<uint32>(SharedThis->Texture->GetSizeY())},
SharedThis->Texture->GetSizeX() * Stride, SharedThis->GetBuffer());
auto FRHITexture2D_Ptr = SharedThis->Texture->GetResource()->GetTexture2DRHI();
uint32 SizeX = FRHITexture2D_Ptr->GetSizeX(), SizeY = FRHITexture2D_Ptr->GetSizeY();
RHIUpdateTexture2D(FRHITexture2D_Ptr, 0,
FUpdateTextureRegion2D{0, 0, 0, 0, SizeX, SizeY},
SizeX * Stride, SharedThis->GetBuffer());
});
}

Expand Down

0 comments on commit b0c36a9

Please sign in to comment.