Closed
Bug 1259696
Opened 9 years ago
Closed 9 years ago
WebGL crash: [@mozilla::WebGLTexture::CopyTexImage2D]
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
FIXED
mozilla48
| Tracking | Status | |
|---|---|---|
| firefox48 | --- | fixed |
People
(Reporter: posidron, Assigned: ethlin)
References
Details
(Keywords: crash, testcase)
Attachments
(3 files, 2 obsolete files)
|
2.31 KB,
text/html
|
Details | |
|
6.62 KB,
text/plain
|
Details | |
|
11.65 KB,
patch
|
Details | Diff | Splinter Review |
| Reporter | ||
Comment 1•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → ethlin
| Reporter | ||
Updated•9 years ago
|
Summary: Crash: [@mozilla::WebGLTexture::CopyTexImage2D] → WebGL crash: [@mozilla::WebGLTexture::CopyTexImage2D]
| Assignee | ||
Comment 2•9 years ago
|
||
Check the read buffer mode in CopyTexImage.
Attachment #8735763 -
Flags: review?(jgilbert)
Comment 3•9 years ago
|
||
Comment on attachment 8735763 [details] [diff] [review]
Check read buffer mode.
Review of attachment 8735763 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/canvas/WebGLContext.h
@@ +1387,5 @@
> RefPtr<const webgl::LinkedProgramInfo> mActiveProgramLinkInfo;
>
> bool ValidateFramebufferTarget(GLenum target, const char* const info);
>
> + GLenum mReadBufferMode;
READ_BUFFER state is attached to each framebuffer, not part of global state. (GLES 3.0.4 p256)
Attachment #8735763 -
Flags: review?(jgilbert) → review-
| Assignee | ||
Comment 4•9 years ago
|
||
In this patch, I use the framebuffer's READ_BUFFER mode to do the check.
Attachment #8735763 -
Attachment is obsolete: true
Attachment #8736341 -
Flags: review?(jgilbert)
Comment 5•9 years ago
|
||
Comment on attachment 8736341 [details] [diff] [review]
Check read buffer mode.
Review of attachment 8736341 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/canvas/WebGLTextureUpload.cpp
@@ +1728,5 @@
> + // GLES 3.0.4 p145:
> + // "Calling CopyTexSubImage3D, CopyTexImage2D, or CopyTexSubImage2D will result in an
> + // INVALID_OPERATION error if any of the following conditions is true: READ_BUFFER
> + // is NONE"
> + if (mContext->IsWebGL2() && srcMode == LOCAL_GL_NONE) {
Drop the IsWebGL2 part, since srcMode should always be non-NONE in WebGL 1.
@@ +1889,5 @@
> + // GLES 3.0.4 p145:
> + // "Calling CopyTexSubImage3D, CopyTexImage2D, or CopyTexSubImage2D will result in an
> + // INVALID_OPERATION error if any of the following conditions is true: READ_BUFFER
> + // is NONE"
> + if (mContext->IsWebGL2() && srcMode == LOCAL_GL_NONE) {
Drop the IsWebGL2 part, since srcMode should always be non-NONE in WebGL 1.
Attachment #8736341 -
Flags: review?(jgilbert) → review+
| Assignee | ||
Comment 6•9 years ago
|
||
Address jgilbert's comments.
Attachment #8736341 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 9•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•