mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-01 15:39:47 +08:00
fix(gpu): decode Gen5 R16 and RG32 render-target formats
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -56,4 +56,26 @@ public sealed class VulkanPresentEncodeFormatTests
|
||||
{
|
||||
Assert.False(VulkanVideoPresenter.IsLinearFloatPresentSource(sourceFormat));
|
||||
}
|
||||
|
||||
// GTA V Enhanced early G-buffer color targets observed as COMPAT failures
|
||||
// when missing from TryDecodeRenderTargetFormat (format=2 / format=11).
|
||||
[Theory]
|
||||
[InlineData(2u, 0u, Format.R16Unorm)]
|
||||
[InlineData(2u, 4u, Format.R16Uint)]
|
||||
[InlineData(2u, 7u, Format.R16Sfloat)]
|
||||
[InlineData(11u, 4u, Format.R32G32Uint)]
|
||||
[InlineData(11u, 5u, Format.R32G32Sint)]
|
||||
[InlineData(11u, 7u, Format.R32G32Sfloat)]
|
||||
public void TryDecodeRenderTargetFormat_DecodesGen5R16AndRg32(
|
||||
uint dataFormat,
|
||||
uint numberType,
|
||||
Format expected)
|
||||
{
|
||||
Assert.True(
|
||||
VulkanVideoPresenter.TryDecodeRenderTargetFormat(
|
||||
dataFormat,
|
||||
numberType,
|
||||
out var decoded));
|
||||
Assert.Equal(expected, decoded.Format);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user