Bug 2125160

Summary: Regression with virglrenderer 0.10.0 and 0.10.1 using NVIDIA graphics
Product: [Fedora] Fedora Reporter: marioroy <marioeroy>
Component: virglrendererAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: airlied, marcandre.lureau
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-12 13:04:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description marioroy 2022-09-08 07:26:11 UTC
Description of problem: OpenGL 3.1 and GLES 3.0 is broken using NVIDIA graphics since virglrenderer 0.10.0. WebGL is no longer accelerated in Firefox like previously with 0.9.1.

Upstream issue: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/286

From Gert Wollny. "With virglrenderer 0.9.1 we were not reporting some host features to the guest correctly, i.e. the uniform buffer size reported to the guest was not taking into account that we were using some uniforms to emulate features or handle some things correctly (e.g. flipping the output vertically like it is sometimes required). Now with virglrenderer 0.10 we moved all this into a separate UBO, so that we now have to discount one UBO when reporting the number of available UBOs in the guest. The minimum required number of UBOs for OpenGL 3.1 is 14, but most mesa drivers report 16 or more UBOs, so it's not a problem to discount one to be used by virglrenderer. It is quite likely that the NVIDIA host driver reports exactly 14 UBOs, and with that the guest will only see 13 usable UBOs, thereby disabling GL_ARB_uniform_buffer_object, which also kills support for OpenGL 3.1 and GLES 3.0."


Version-Release number of selected component (if applicable): 0.10.0 and 0.10.1


How reproducible: 100% reproducible.


Steps to Reproduce:
1. Launch Firefox and try a WebGL demonstration. For example, visit https://webglsamples.org/aquarium/aquarium.html. Select 10000 fish. Using NVIDIA RTX 3070, 21 fps with 0.10.1 versus 60+ fps with 0.9.1, previously.
2. Alternatively, run Firefox on the command-line as described in the upstream issue.

Actual results: Firefox reports, "Failed to create EGLContext!" and eventually "Fallback WR to SW-WR".


Expected results: For OpenGL 3.1 and GLES 3.0 to work successfully using NVIDIA graphics. Reverting to virglrenderer 0.9.1 on the host OS resolves the issue.


Additional info:

Comment 1 marioroy 2022-09-12 10:24:43 UTC
The virglrenderer maintainer(s) merged two fixes upstream, PRs 922 and 923, closing issue 286.

https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests?scope=all&state=merged