mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
Merge pull request #1086 from Celegans12/fix/agc-depth-bias-clamp-default
fix(agc): include PA_SU_POLY_OFFSET_CLAMP in the initial context state
This commit is contained in:
@@ -151,7 +151,7 @@ inline Registers InitialContextRegisters() {
|
||||
{0x1b1, 0}, {0x1b6, 0}, {0x1c3, 0}, {0x1c4, 0}, {0x1c5, 0},
|
||||
{0x1ff, 0}, {0x292, 2}, {0x293, 0}, {0x29b, 0},
|
||||
{0x2ce, 0}, {0x2d3, 0}, {0x2d5, 0}, {0x2d6, 0}, {0x2db, 0},
|
||||
{0x2dc, 0xaa00}, {0x2e4, 0}, {0x2f8, 0}, {0x2f9, 0x2d},
|
||||
{0x2dc, 0xaa00}, {0x2df, 0}, {0x2e4, 0}, {0x2f8, 0}, {0x2f9, 0x2d},
|
||||
{0x30e, 0xffffffff}, {0x30f, 0xffffffff}, {0x313, 0x6000},
|
||||
{0x318, 0}, {0x31b, 0}, {0x31c, 0}, {0x31d, 0},
|
||||
{0x390, 0}, {0x3b0, 0}, {0x3b8, 0}
|
||||
|
||||
@@ -696,6 +696,14 @@ void DepthBoundsBiasTests() {
|
||||
Require(state.depthBias && state.depthBiasConstant == 4.0f, "culled back faces must not constrain the front depth bias");
|
||||
queue.context[0x2de] = 0x1f0u;
|
||||
expectFailure([&] { AgcDriver::Graphics::DecodeState(queue); }, "units other than the depth format");
|
||||
queue.context[0x2de] = 0x1e9u;
|
||||
auto cleared = queue;
|
||||
cleared.ClearContext();
|
||||
for (const auto& [offset, value] : queue.context) {
|
||||
if (offset != 0x2dfu) cleared.context[offset] = value;
|
||||
}
|
||||
state = AgcDriver::Graphics::DecodeState(cleared);
|
||||
Require(state.depthBias && state.depthBiasConstant == 4.0f && state.depthBiasClamp == 0.0f, "a depth bias clamp the title never writes must decode as its reset value 0");
|
||||
}
|
||||
|
||||
alignas(256) std::array<std::uint8_t, 4> dccKeys{};
|
||||
|
||||
Reference in New Issue
Block a user