Crash when rendering with Bink.

Hi,

We are getting a crash when using ‘BinkMediaTexture’.

hr failed at C:\Clients\P1\P1\Engine\Source\Runtime\D3D12RHI\Private\D3D12CommandList.cpp:277 with error E_INVALIDARG

Same issue as seen in this link:

So checking is that the right thing to do changing the code to add:

ETextureCreateFlags::UAV

is the right thing to do or should be looking somewhere else? And if this is the fix is this good for Consoles too?

Thanks,

Simon

From:

const FRHITextureCreateDesc Desc =
		FRHITextureCreateDesc::Create2D(DebugName)
		.SetExtent(w, h)
		.SetFormat(PixelFormat)
		.SetFlags(TexCreateFlags | ETextureCreateFlags::RenderTargetable | ETextureCreateFlags::ShaderResource)
		.SetInitialState(ERHIAccess::SRVMask);


To:

const FRHITextureCreateDesc Desc =
		FRHITextureCreateDesc::Create2D(DebugName)
		.SetExtent(w, h)
		.SetFormat(PixelFormat)
		.SetFlags(TexCreateFlags | ETextureCreateFlags::RenderTargetable | ETextureCreateFlags::ShaderResource | ETextureCreateFlags::UAV)
		.SetInitialState(ERHIAccess::SRVMask);



[Attachment Removed]

Hello,

I believe the fix for this issue is to transition the texture back to SRV which was done in CL#42996416 Transition Bink Media Texture back to SRV instead of UAV. See the related public issue here.

We have not added ETextureCreateFlags::UAV as a fix. Please let me if applying the changelist above doesn’t fix the issue for you.

[Attachment Removed]

Sorry for delay answering.

The solution worked great.

Thank you

[Attachment Removed]

Thanks.

Will make the changes and see.

Simon

[Attachment Removed]