Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ ColorTarget DecodeColorBuffer(const Registers& cx, std::uint32_t slot) {
Require(((attrib3 >> 24u) & 3u) != 0u || (attrib2 & 0x3fffu) == 0u, "1D color targets taller than one row are unsupported");
if (volume) {
color.depth = (attrib3 & 0x1fffu) + 1u;
Require(maxMip == 0 && (info & 0x10000000u) == 0, "mipmapped or DCC 3D color targets are unsupported");
Require(maxMip == 0, "mipmapped 3D color targets are unsupported");
Require(slice < color.depth, "the color view slice is beyond the 3D surface");
color.depthSlice = slice;
} else if ((attrib3 & 0x1fffu) != 0) {
Expand Down
5 changes: 4 additions & 1 deletion core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,10 @@ void DepthStencilTests() {
expectFailure([&] { AgcDriver::Graphics::DecodeState(queue); }, "beyond the 3D surface");
queue.context[0x31b] = 0;
queue.context[0x31c] |= 0x10000000;
expectFailure([&] { AgcDriver::Graphics::DecodeState(queue); }, "DCC 3D color targets");
queue.context[0x325] = 0x1234;
Require(AgcDriver::Graphics::DecodeState(queue).color.dccAddress == 0x123400u, "a DCC 3D color target did not keep its metadata address");
queue.context[0x3b0] |= 1u << 28u;
expectFailure([&] { AgcDriver::Graphics::DecodeState(queue); }, "mipmapped 3D color targets");
}

void OneDimensionalColorTests() {
Expand Down
Loading