mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-02 03:10:15 +08:00
WebGL2 on ANGLE's D3D11 backend (Chrome on Windows) has exactly 12 uniform blocks per stage. vrend keeps one for its VirglBlock, so Mesa's virgl driver saw 11 uniform buffers, turned uniform buffer objects off and with them GLES 3.0: the guest got OpenGL ES 2.0. virglrenderer patch 21 declares the system values as plain uniforms instead when 24 blocks and bindings fit and the ordinary uniform limits have room for them, so the guest gets all 12 blocks. test/gl/kwgl-ubo12.c (vtest-check.sh ubo12) draws with twelve distinct buffers in each stage; bridge-check.sh --ubo N has the page cap the limits the wasm renderer sees, which reproduces the D3D11 host on SwiftShader (14 per stage). Co-authored-by: Pooya Parsa <pooya@pi0.io> Co-authored-by: Niklas Olsson <niklas.olsson@hotmail.co.uk>