[Test] (SelfTest): model the vertex-input-location and layered-blit defects in the fake driver and pin both probes' controls

This commit is contained in:
2026-08-25 05:57:58 -04:00
parent d83a48da5c
commit 12df061e0b
3 changed files with 311 additions and 19 deletions
@@ -1516,7 +1516,11 @@ namespace MobileGL::MG_Util::BackendLoader {
// lowers the number, and only on evidence.
const SelfTest::VertexInputLocationCeilingMeasurement& locationCeiling =
SelfTest::ExplicitVertexInputLocationCeiling(glesFuncs);
caps.MaxVertexAttribs = std::min(maxVertexAttribs, locationCeiling.usableLocations);
// Guarded on `detected` rather than on the number alone: a probe that reached no verdict
// has measured nothing, and the clamp must be driven by evidence or not applied at all.
caps.MaxVertexAttribs = locationCeiling.detected
? std::min(maxVertexAttribs, locationCeiling.usableLocations)
: maxVertexAttribs;
if (locationCeiling.detected) {
MGLOG_I(" GL_MAX_VERTEX_ATTRIBS reduced from the driver's %d to %d: "
"layout(location = N) on a vertex input is refused from N = %d upward",