-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #11168 - daoshengmu:texSubImage2D, r=emilio
Implement WebGL TexSubImage2D 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: - [ ] There are tests for these changes OR - [X] These changes do not require tests because I have run the wpt test of texSubImage2D.html, and it works. Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. I have implemented ```TexSubImage2D``` follow [the spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). This is my first version of implementation, and I notice I can reuse the code from ```TexImage2D```. Therefore, I would like to discuss make ```validate_tex_image2D_from_buffer``` and ```validate_tex_image2D_from_source``` to remove duplicate code. Part of #10209 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11168) <!-- Reviewable:end -->
- Loading branch information
Showing
7 changed files
with
755 additions
and
125 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...metadata/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html.ini
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...data/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html.ini
This file was deleted.
Oops, something went wrong.
99 changes: 93 additions & 6 deletions
99
...nce-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,107 @@ | ||
[tex-image-and-sub-image-2d-with-array-buffer-view.html] | ||
type: testharness | ||
[WebGL test #0: successfullyParsed should be true. Was false.] | ||
|
||
[WebGL test #0: at (0, 0) expected: 0,255,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas] | ||
[WebGL test #1: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #1: successfullyParsed should be true. Was false.] | ||
[WebGL test #2: at (0, 0) expected: 0,0,255,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #0: at (0, 0) expected: 0,255,0,255 was 255,0,0,255] | ||
[WebGL test #3: at (0, 4) expected: 255,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #1: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
[WebGL test #4: at (8, 0) expected: 0,255,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #5: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #6: at (0, 0) expected: 0,0,255,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #7: at (0, 4) expected: 255,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #8: at (8, 0) expected: 0,255,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #9: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #10: at (8, 8) expected: 0,0,255,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #11: at (8, 12) expected: 255,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #12: GL error before texture upload] | ||
expected: FAIL | ||
|
||
[WebGL test #25: GL error before texture upload] | ||
expected: FAIL | ||
|
||
[WebGL test #26: at (0, 0) expected: 0,0,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #27: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #28: at (0, 0) expected: 0,0,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #29: at (0, 4) expected: 255,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #2: successfullyParsed should be true. Was false.] | ||
[WebGL test #30: at (8, 0) expected: 0,0,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #31: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #32: at (0, 0) expected: 0,0,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #33: at (0, 4) expected: 255,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #34: at (8, 0) expected: 0,0,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #35: at (0, 8) expected: 255,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #36: at (8, 8) expected: 0,0,0,255 was 255,0,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #37: at (8, 12) expected: 255,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #38: GL error before texture upload] | ||
expected: FAIL | ||
|
||
[WebGL test #40: at (0, 8) expected: 0,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #42: at (0, 4) expected: 0,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #44: at (0, 8) expected: 0,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #46: at (0, 4) expected: 0,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #48: at (0, 8) expected: 0,0,0,255 was 0,255,0,255] | ||
expected: FAIL | ||
|
||
[WebGL test #50: at (8, 12) expected: 0,0,0,255 was 0,0,255,255] | ||
expected: FAIL | ||
|
||
[WebGL test #51: GL error before texture upload] | ||
expected: FAIL | ||
|
||
[WebGL test #52: successfullyParsed should be true. Was false.] | ||
expected: FAIL |
Oops, something went wrong.