Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for packed depth stencil attachment. #97
Conversation
ab76951
to
470817e
|
@emilio do you want to also have a look? Edit: thanks @MortimerGoro ! It's great to finally support packed DS, should get more efficient for our stencil usage. |
|
Looks good % nits, thanks @MortimerGoro! Also, thanks for taking a look @kvark :) |
| @@ -47,8 +48,10 @@ impl<Native> GLContext<Native> | |||
| }; | |||
|
|
|||
| try!(native_context.make_current()); | |||
| let extensions = gl_.get_string(gl::EXTENSIONS); | |||
| let extensions: Vec<String> = extensions.split(&[',',' '][..]).map(|s| s.into()).collect(); | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
MortimerGoro
Apr 10, 2017
Author
Collaborator
I didn't use Vec<&str> in this case because the String returned from gl.get_string(gl::EXTENSIONS) is destroyed. We'd need to save it somewhere to have a Vec<&str>
This comment has been minimized.
This comment has been minimized.
emilio
Apr 11, 2017
Member
Oh, didn't notice you were saving all the extensions there, right. Then that looks fine.
| // detect if the GPU supports RGB8 and RGBA8 renderbuffer/texture storage formats. | ||
| // GL_ARM_rgba8 extension is similar to OES_rgb8_rgba8, but only exposes RGBA8. | ||
| let extensions = gl.get_string(gl::EXTENSIONS); | ||
| let extensions: Vec<&str> = extensions.split(&[',',' '][..]).collect(); |
This comment has been minimized.
This comment has been minimized.
src/tests.rs
Outdated
|
|
||
| #[test] | ||
| fn test_stencil_no_depth() { | ||
| let mut attributes = GLContextAttributes::default(); |
This comment has been minimized.
This comment has been minimized.
emilio
Apr 10, 2017
Member
You can use the:
let attributes = GLContextAttributes {
depth: true,
stencil: true,
.. Default::default(),
};syntax, which is a bit nicer IMO.
…buffer error on some platforms when using both depth and stencil attachments.
470817e
to
b983a0f
bors-servo
added a commit
to servo/servo
that referenced
this pull request
May 22, 2017
Update offscreen_gl_context to 0.8.8 <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16867) <!-- Reviewable:end -->
bors-servo
added a commit
to servo/servo
that referenced
this pull request
May 25, 2017
Update offscreen_gl_context to 0.8.8 <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16867) <!-- Reviewable:end -->
bors-servo
added a commit
to servo/servo
that referenced
this pull request
May 27, 2017
Update offscreen_gl_context <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16867) <!-- Reviewable:end -->
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
May 28, 2017
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : fe30e163752773708e2fd1f00abe0662237cff24
aethanyc
pushed a commit
to aethanyc/gecko-dev
that referenced
this pull request
May 28, 2017
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47
JerryShih
pushed a commit
to JerryShih/gecko-dev
that referenced
this pull request
May 30, 2017
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47
Manishearth
pushed a commit
to Manishearth/gecko-dev
that referenced
this pull request
Jun 11, 2017
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47
brendandahl
pushed a commit
to brendandahl/gecko
that referenced
this pull request
Jul 10, 2017
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Oct 1, 2019
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47 UltraBlame original commit: 0e5adeceb9b8a1160c0a75989d571ca2928b7e58
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Oct 1, 2019
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47 UltraBlame original commit: 0e5adeceb9b8a1160c0a75989d571ca2928b7e58
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Oct 1, 2019
…update_offscreen_gl_ctx); r=jdm <!-- Please describe your changes on the following line: --> Adds servo/surfman#97 and servo/surfman#98 required to run some WebGL demos --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 00a5da36fbe8fdc8336ff1800ad16d0141c77c47 UltraBlame original commit: 0e5adeceb9b8a1160c0a75989d571ca2928b7e58
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
MortimerGoro commentedApr 10, 2017
Add support for packed depth stencil attachment. Fix incomplete framebuffer error on some platforms when using both depth and stencil attachments.