test(agc): check the MRT0 export formats alpha-to-coverage accepts
Formats 4, 5, 6 and 9 (FP16, UNORM16, SNORM16 and 32-bit float ABGR) decode with alpha-to-coverage; formats 1, 2 and 3, which carry no floating-point alpha, still throw.
This commit is contained in:
parent
9a9bd3fb3c
commit
109eb81d62
|
|
@ -1685,8 +1685,14 @@ void AlphaToCoverageTests() {
|
|||
}
|
||||
queue.context[0x2dc] = 0xaa01;
|
||||
const auto exportFormat = queue.context.at(0x1c5);
|
||||
queue.context[0x1c5] = (exportFormat & ~0xfu) | 1u;
|
||||
expectFailure([&] { AgcDriver::Graphics::DecodeState(queue); }, "floating-point alpha");
|
||||
for (const auto format : {4u, 5u, 6u, 9u}) {
|
||||
queue.context[0x1c5] = (exportFormat & ~0xfu) | format;
|
||||
Require(AgcDriver::Graphics::DecodeState(queue).alphaToCoverage, "alpha-to-coverage rejected an MRT0 export format with a floating-point alpha");
|
||||
}
|
||||
for (const auto format : {1u, 2u, 3u}) {
|
||||
queue.context[0x1c5] = (exportFormat & ~0xfu) | format;
|
||||
expectFailure([&] { AgcDriver::Graphics::DecodeState(queue); }, "floating-point alpha");
|
||||
}
|
||||
queue.context[0x1c5] = exportFormat;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue