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

webgl: texture size validation fixes #13898

Merged
merged 2 commits into from Oct 24, 2016
Merged

Conversation

@anholt
Copy link
Contributor

anholt commented Oct 24, 2016

This pull request fixes the errors in texture-size-limit.html.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

anholt added 2 commits Oct 23, 2016
texture-size-limit.html is using a large array for all of its calls at
various sizes, and we were throwing errors on the calls that should
have passed.
We were checking to see if it was too big to be level 0, but we really
want to see if it's too big to be the given level.

This was the last remaining failure in texture-size-limit.html.
@highfive
Copy link

highfive commented Oct 24, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/webglrenderingcontext.rs, components/script/dom/webgl_validations/tex_image_2d.rs
  • @fitzgen: components/script/dom/webglrenderingcontext.rs, components/script/dom/webgl_validations/tex_image_2d.rs
  • @emilio: components/script/dom/webglrenderingcontext.rs, components/script/dom/webgl_validations/tex_image_2d.rs
@emilio
emilio approved these changes Oct 24, 2016
// GL_INVALID_VALUE is generated if width or height is greater than
// GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or
// GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
if self.width as u32 > max_size || self.height as u32 > max_size {
if width > max_size >> level || height > max_size >> level {

This comment has been minimized.

@emilio

emilio Oct 24, 2016

Member

/me facepalms himself

@emilio
Copy link
Member

emilio commented Oct 24, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 24, 2016

📌 Commit 5b852b1 has been approved by emilio

@highfive highfive assigned emilio and unassigned mbrubeck Oct 24, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Oct 24, 2016

Testing commit 5b852b1 with merge f3973a0...

bors-servo added a commit that referenced this pull request Oct 24, 2016
webgl: texture size validation fixes

<!-- Please describe your changes on the following line: -->
This pull request fixes the errors in texture-size-limit.html.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13898)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 24, 2016

💔 Test failed - mac-rel-css

@jdm
Copy link
Member

jdm commented Oct 24, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 24, 2016

Previous build results for arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only mac-rel-css...

@bors-servo
Copy link
Contributor

bors-servo commented Oct 24, 2016

@bors-servo bors-servo merged commit 5b852b1 into servo:master Oct 24, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.