Closed Bug 717442 Opened 13 years ago Closed 12 years ago

WebGL should shadow GL state so as to minimize state queries

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jgilbert, Assigned: jgilbert)

Details

Attachments

(1 file, 2 obsolete files)

In most cases, GL state access should be trivial, but it's not guaranteed to be so, and will probably not be trivial on some drivers.

As such, we should shadow what state we commonly use so as to minimize extra queries.
We already do shadow some state, for the reason you mention.

What more do you think we should shadow?
I think the only pressing need is framebuffer bindings. I was trying to think if there would be a nice way to make shadowing more general.
Attached patch Shadow bound FBO ids. (obsolete) — Splinter Review
This seems to work.

I'm not sure why my previous attempt didn't work.
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Attachment #595252 - Flags: review?(bjacob)
Attached patch Shadow bound FBO ids. (obsolete) — Splinter Review
Fixed a warning.
Attachment #595252 - Attachment is obsolete: true
Attachment #595252 - Flags: review?(bjacob)
Attachment #595267 - Flags: review?(bjacob)
Comment on attachment 595267 [details] [diff] [review]
Shadow bound FBO ids.

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

r=me provided the following is addressed:

::: gfx/gl/GLContext.h
@@ +856,5 @@
> +
> +
> +
> +    GLuint mBoundDrawFBO;
> +    GLuint mBoundReadFBO;

That should probably not be public.
Attachment #595267 - Flags: review?(bjacob) → review+
Final patch, carrying r+ forward, and fixing the bug number on the patch. (Patch was pointing at bug 717422)
Attachment #595267 - Attachment is obsolete: true
Attachment #595567 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/2c49ea176da2
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: