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 e95acbc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions DolbyIO/Source/Private/Video/DolbyIOVideoTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ 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();
auto SizeX = FRHITexture2D_Ptr->GetSizeX();
auto 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 e95acbc

Please sign in to comment.