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

Various improvements to the reducer #37

Merged
merged 8 commits into from
Oct 3, 2018

Conversation

afd
Copy link
Contributor

@afd afd commented Oct 3, 2018

A number of improvements to the reducer to make it more capable at shrinking down shaders.

if (isOneFloat(maybeFce.get().getArg(0))) {
addReplaceWithZero(parent, child);
if (isZeroFloat(maybeFce.get().getArg(0))) {
addReplaceWithOne(parent, child);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix :)

Copy link
Collaborator

@hevrard hevrard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@afd afd merged commit af1d131 into master Oct 3, 2018
@afd afd deleted the inline_uniform_reduction_opportunity branch October 3, 2018 19:55
hevrard pushed a commit that referenced this pull request Oct 10, 2018
* Added facility for the reducer to inline uniform values into a shader.

* Adjusted tests according to changes in how uniform pruning works.

* Fixed bug in constant folding of cos.

* Folding of -0 and +0 to 0 in reducer.

* Constant folder now removes redundant parentheses.

* Added reduction of vector constructor lookups, e.g. vec4(1.0, 2.0, 3.0, 4.0).y -> 3.0.
@afd afd added this to the 1.0 milestone Mar 13, 2019
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.

2 participants