Closed Bug 1805625 Opened 1 year ago Closed 1 year ago

GLBlitHelper: Vertex attribute name is incorrect

Categories

(Core :: Graphics: WebRender, defect, P2)

Firefox 108
defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: lina, Assigned: jgilbert)

Details

Attachments

(1 file)

Steps to reproduce:

GLBlitHelper.cpp:776 binds the wrong attribute name for the vertex shader. It tries to bind "aPosition", but the attribute is called "aVert"

  1. apitrace trace firefox
  2. Visit https://app.plex.tv/desktop/
  3. Exit firefox
  4. apitrace dump firefox

Actual results:

The captured shader has an attribute named aVert:

217 glShaderSource(shader = 4, count = 2, string = {"#version 100
[...]
ATTRIBUTE vec2 aVert; // [0.0-1.0]

But Firefox issues this call:

225 glBindAttribLocation(program = 6, index = 0, name = "aPosition")

This is followed by a fake get for aVert introduced by apitrace itself.

Expected results:

Firefox should use the right name for glBindAttribLocation. I don't think this actually breaks since it ends up bound by default to attribute 0 anyway, but it's clearly wrong.

Hello! I have tried to reproduce the issue using firefox 110.0a1 (2022-12-20) on Ubuntu 22.04 but unfortunately I wasn't able to reproduce it on my end.
Could you please answer the following questions in order to further investigate this issue?

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed if so can you list them?
Flags: needinfo?(lina)

I'm not sure what you mean by reproducing the issue? There is nothing to reproduce...

The code works, but it works by accident. You can tell it's doing the wrong thing with apitrace or just by reading it. So it's a bug, it just happens to work because there is only one attribute and that ends up at index 0 by default.

Flags: needinfo?(lina)

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

The severity field is not set for this bug.
:gw, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gwatson)
Severity: -- → S3
Flags: needinfo?(gwatson) → needinfo?(jgilbert)

Oops, thanks!
Feel free to needinfo me directly for issues like this!

Assignee: nobody → jgilbert
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jgilbert)

This changed a while back, and though it should default to 0 anyway,
it's best to do the right thing here.

Severity: S3 → S4
Priority: -- → P2
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/5aed3130f834
BindAttribLocation on the correct attrib name. r=gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: