test(agc): cover indexed rect-list draws with a partial last rectangle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0418aaaad2
commit
780303049b
|
|
@ -3025,8 +3025,9 @@ void rectListTests() {
|
|||
queue.userConfig[0x242] = 17;
|
||||
const auto state = DecodeState(queue);
|
||||
const Context context{};
|
||||
const auto drawFailure = [&](std::uint32_t count) {
|
||||
const AgcDriver::Pm4::DrawParameters draw{0, count, 0, 1, 0, false};
|
||||
std::array<std::uint16_t, 8> indices{};
|
||||
const auto drawFailure = [&](std::uint32_t count, bool indexed) {
|
||||
const AgcDriver::Pm4::DrawParameters draw = indexed ? AgcDriver::Pm4::DrawParameters{reinterpret_cast<std::uint64_t>(indices.data()), count, 2, 1, 0, true} : AgcDriver::Pm4::DrawParameters{0, count, 0, 1, 0, false};
|
||||
try {
|
||||
Draw(context, state, draw, {});
|
||||
} catch (const std::exception& error) {
|
||||
|
|
@ -3034,8 +3035,10 @@ void rectListTests() {
|
|||
}
|
||||
return std::string{};
|
||||
};
|
||||
const auto complete = drawFailure(3);
|
||||
for (const auto count : {4u, 5u}) Require(drawFailure(count) == complete, "a rect-list draw with a partial last rectangle was not drawn like its complete rectangles");
|
||||
for (const auto indexed : {false, true}) {
|
||||
const auto complete = drawFailure(3, indexed);
|
||||
for (const auto count : {4u, 5u}) Require(drawFailure(count, indexed) == complete, "a rect-list draw with a partial last rectangle was not drawn like its complete rectangles");
|
||||
}
|
||||
}
|
||||
|
||||
ShaderRecompiler::RecompileResult recompilePixel(std::initializer_list<std::uint32_t> controls, std::span<const std::uint32_t> code) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue