GS/DX12: Fix incorrect pipeline RT format

This commit is contained in:
Stenzek 2023-02-25 12:59:22 +10:00 committed by refractionpcsx2
parent e01eac615d
commit 3433a42e42
1 changed files with 7 additions and 4 deletions

View File

@ -1563,10 +1563,13 @@ GSDevice12::ComPtr<ID3D12PipelineState> GSDevice12::CreateTFXPipeline(const Pipe
gpb.SetRasterizationState(D3D12_FILL_MODE_SOLID, D3D12_CULL_MODE_NONE, false); gpb.SetRasterizationState(D3D12_FILL_MODE_SOLID, D3D12_CULL_MODE_NONE, false);
if (p.rt) if (p.rt)
{ {
gpb.SetRenderTarget(0, const GSTexture::Format format = IsDATEModePrimIDInit(p.ps.date) ?
IsDATEModePrimIDInit(p.ps.date) ? DXGI_FORMAT_R32_FLOAT : GSTexture::Format::PrimID :
p.ps.hdr ? DXGI_FORMAT_R32G32B32A32_FLOAT : (p.ps.hdr ? GSTexture::Format::HDRColor : GSTexture::Format::Color);
DXGI_FORMAT_R8G8B8A8_UNORM);
DXGI_FORMAT native_format;
LookupNativeFormat(format, nullptr, nullptr, &native_format, nullptr);
gpb.SetRenderTarget(0, native_format);
} }
if (p.ds) if (p.ds)
gpb.SetDepthStencilFormat(DXGI_FORMAT_D32_FLOAT_S8X24_UINT); gpb.SetDepthStencilFormat(DXGI_FORMAT_D32_FLOAT_S8X24_UINT);