Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OES_standard_derivatives support #8

Merged
merged 1 commit into from
Feb 16, 2012
Merged

Conversation

confusionattack
Copy link
Contributor

Hi,

The glsl-optimizer end of my derivatives change. Cheers,

-chris

aras-p added a commit that referenced this pull request Feb 16, 2012
OES_standard_derivatives support
@aras-p aras-p merged commit 95acda1 into aras-p:master Feb 16, 2012
@aras-p
Copy link
Owner

aras-p commented Feb 16, 2012

Very nice!

I've reverted unconditional enable of GL_OES_standard_derivatives. Doing that makes all shaders in output have the extension line, and IIRC quite a lot of Android devices still don't support that.

@confusionattack
Copy link
Contributor Author

Oops! Good point about Android and standard derivatives.

-chris

casseveritt pushed a commit to casseveritt/glsl-optimizer that referenced this pull request Sep 10, 2012
Classic compiler mistake.  In the example below, the OMOD optimization
was combining instructions 4 and 10, but since there was an instruction
(aras-p#8) in between them that wrote to the same registers as instruction 10,
instruction 11 was reading the wrong value.

Example of the mistake:

Before OMOD:
4: MAD temp[0].y, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
10: MUL temp[2].x, const[1].y___, temp[0].y___;
11: FRC temp[5].x, temp[2].x___;

After OMOD:
4: MAD temp[2].x / 8, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
11: FRC temp[5].x, temp[2].x___;

https://bugs.freedesktop.org/show_bug.cgi?id=41367
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants