The default bug view has changed. See this FAQ.

NV GL driver messes up when relinking the currently-bound program

RESOLVED FIXED in mozilla15

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jgilbert, Assigned: jgilbert)

Tracking

unspecified
mozilla15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
This is the conformance failure we're seeing on:
uniforms/uniform-location.html

This is fixed simply by rebinding the program after relink if it is the current program.
(Assignee)

Comment 1

5 years ago
Created attachment 619714 [details] [diff] [review]
Patch
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Attachment #619714 - Flags: review?(bjacob)
(Assignee)

Comment 2

5 years ago
https://tbpl.mozilla.org/?tree=Try&rev=dedf969dcf53
(Assignee)

Comment 3

5 years ago
https://tbpl.mozilla.org/?tree=Try&rev=d8dc91c6c0ea
(Assignee)

Updated

5 years ago
Summary: NV GL drivers messes up when relinking the currently-bound program → NV GL driver messes up when relinking the currently-bound program
(Assignee)

Comment 4

5 years ago
Comment on attachment 619714 [details] [diff] [review]
Patch

Review of attachment 619714 [details] [diff] [review]:
-----------------------------------------------------------------

Limit this to nVidia HW and annotate this workaround with this bug number, similar to the existing:
// bug 744888
        if (WorkAroundDriverBugs() &&
            !data &&
            Vendor() == VendorNVIDIA)
Attachment #619714 - Flags: review-
Comment on attachment 619714 [details] [diff] [review]
Patch

Review of attachment 619714 [details] [diff] [review]:
-----------------------------------------------------------------

Waiting for updated patch then. OK in principle.
Attachment #619714 - Flags: review?(bjacob)
(Assignee)

Comment 6

5 years ago
Created attachment 620134 [details] [diff] [review]
Patch

Fixed up with bug comment and limited to NV hardware.
I also added a function fGetUIntegerv, which replaces this common meme:
GLuint name = 0;
fGetIntegerv(LOCAL_GL_PARAM, (GLint*)&name);

With:
GLuint name = 0;
fGetUIntegerv(LOCAL_GL_PARAM, &name);
Attachment #619714 - Attachment is obsolete: true
Attachment #620134 - Flags: review?(bjacob)
(Assignee)

Comment 7

5 years ago
https://tbpl.mozilla.org/?tree=Try&rev=6b430c5babba
Comment on attachment 620134 [details] [diff] [review]
Patch

Review of attachment 620134 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/canvas/src/WebGLContextGL.cpp
@@ +3347,5 @@
> +            updateInfoSucceeded &&
> +            gl->Vendor() == gl::GLContext::VendorNVIDIA)
> +        {
> +            GLuint curProgram = 0;
> +            gl->fGetUIntegerv(LOCAL_GL_CURRENT_PROGRAM, &curProgram);

Wait! if all you need to know is whether this program is the current one, you don't need to query the GL for that. You can simply compare the pointers to WebGLProgram objects. Compare |program| to |mCurrentProgram|.

::: gfx/gl/GLContext.h
@@ +1890,5 @@
>      }
>  
> +    void fGetUIntegerv(GLenum pname, GLuint* param) {
> +        fGetIntegerv(pname, (GLint*)param);
> +    }

Since this function is not in the real GL API, it shouldn't have this 'f' prefix, which comes from these functions originally being the raw function pointers loaded from GL libs.

But see other comment, it shouldn't be needed.
Attachment #620134 - Flags: review?(bjacob) → review-
(Assignee)

Comment 9

5 years ago
Created attachment 621742 [details] [diff] [review]
patch
Attachment #620134 - Attachment is obsolete: true
Attachment #621742 - Flags: review?(bjacob)
Attachment #621742 - Flags: review?(bjacob) → review+
(Assignee)

Comment 10

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec507e41777f
Target Milestone: --- → mozilla15
(Assignee)

Comment 11

5 years ago
Previous landing was a null push.

Actual push:
https://hg.mozilla.org/integration/mozilla-inbound/rev/60ac5e1aba15
https://hg.mozilla.org/mozilla-central/rev/60ac5e1aba15
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 13

5 years ago
FYI, this has been filed as NVIDIA Incident 110263 and is tracked on the WebGL WG's internal wiki.
You need to log in before you can comment on or make changes to this bug.