WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
148020
GraphicsContext3D::activeTexture should not be called with zero-based index
https://bugs.webkit.org/show_bug.cgi?id=148020
Summary
GraphicsContext3D::activeTexture should not be called with zero-based index
Jinyoung Hur
Reported
2015-08-13 23:20:57 PDT
There are some misusage of GraphicsContext3D::activeTexture in WebGLRenderingContextBase::checkTextureCompleteness. GraphicsContext3D::activeTexture is expected to be used with an argument that is greater than or equal to GraphicsContext3D::TEXTURE0. However, WebGLRenderingContextBase::checkTextureCompleteness calls GraphicsContext3D::activeTexture with a zero-based index.
Attachments
Patch
(2.41 KB, patch)
2015-08-13 23:34 PDT
,
Jinyoung Hur
no flags
Details
Formatted Diff
Diff
Patch
(4.15 KB, patch)
2015-08-19 10:40 PDT
,
Jinyoung Hur
no flags
Details
Formatted Diff
Diff
Patch
(4.19 KB, patch)
2015-08-19 11:00 PDT
,
Jinyoung Hur
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews107 for mac-mavericks-wk2
(600.68 KB, application/zip)
2015-08-19 11:54 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews101 for mac-mavericks
(598.59 KB, application/zip)
2015-08-19 12:51 PDT
,
Build Bot
no flags
Details
Patch
(5.06 KB, patch)
2015-08-19 15:31 PDT
,
Jinyoung Hur
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Jinyoung Hur
Comment 1
2015-08-13 23:34:43 PDT
Created
attachment 258989
[details]
Patch
Alex Christensen
Comment 2
2015-08-17 10:00:16 PDT
Comment on
attachment 258989
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258989&action=review
> Source/WebCore/ChangeLog:11 > + No new tests because there is no behavior change.
If there is no behavior change, then what does this fix?
Said Abou-Hallawa
Comment 3
2015-08-17 10:01:26 PDT
Comment on
attachment 258989
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258989&action=review
> Source/WebCore/ChangeLog:11 > + No new tests because there is no behavior change.
There should be a behavior change since there is a bug in passing the wrong parameter value to GraphicsContext3D::activeTexture(). Can not we have a layout test or even a test case which shows the rendering difference between before and after the fix?
> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4064 > + m_context->activeTexture(m_activeTextureUnit + GraphicsContext3D::TEXTURE0);
Yes this looks a correct fix. This can be verified from
https://www.khronos.org/opengles/sdk/docs/man/xhtml/glActiveTexture.xml
and from WebGLRenderingContextBase::activeTexture() in which we set m_activeTextureUnit = texture - GraphicsContext3D::TEXTURE0.
Jinyoung Hur
Comment 4
2015-08-17 16:57:48 PDT
(In reply to
comment #2
)
> Comment on
attachment 258989
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=258989&action=review
> > > Source/WebCore/ChangeLog:11 > > + No new tests because there is no behavior change. > > If there is no behavior change, then what does this fix?
You're right. I'll revise my patch.
Jinyoung Hur
Comment 5
2015-08-17 17:00:22 PDT
(In reply to
comment #3
)
> Comment on
attachment 258989
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=258989&action=review
> > > Source/WebCore/ChangeLog:11 > > + No new tests because there is no behavior change. > > There should be a behavior change since there is a bug in passing the wrong > parameter value to GraphicsContext3D::activeTexture(). Can not we have a > layout test or even a test case which shows the rendering difference between > before and after the fix? > > > Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4064 > > + m_context->activeTexture(m_activeTextureUnit + GraphicsContext3D::TEXTURE0); > > Yes this looks a correct fix. This can be verified from >
https://www.khronos.org/opengles/sdk/docs/man/xhtml/glActiveTexture.xml
and > from WebGLRenderingContextBase::activeTexture() in which we set > m_activeTextureUnit = texture - GraphicsContext3D::TEXTURE0.
Thank you for review. I'll try to include a test case that shows the behavior difference.
Jinyoung Hur
Comment 6
2015-08-19 10:40:36 PDT
Created
attachment 259377
[details]
Patch
Jinyoung Hur
Comment 7
2015-08-19 11:00:16 PDT
Created
attachment 259379
[details]
Patch
Build Bot
Comment 8
2015-08-19 11:53:56 PDT
Comment on
attachment 259379
[details]
Patch
Attachment 259379
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/76152
New failing tests: fast/canvas/webgl/texture-complete.html
Build Bot
Comment 9
2015-08-19 11:54:00 PDT
Created
attachment 259385
[details]
Archive of layout-test-results from ews107 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 10
2015-08-19 12:51:08 PDT
Comment on
attachment 259379
[details]
Patch
Attachment 259379
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/76302
New failing tests: fast/canvas/webgl/texture-complete.html
Build Bot
Comment 11
2015-08-19 12:51:10 PDT
Created
attachment 259390
[details]
Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Jinyoung Hur
Comment 12
2015-08-19 15:31:47 PDT
Created
attachment 259416
[details]
Patch
Alex Christensen
Comment 13
2015-08-19 17:05:15 PDT
Comment on
attachment 259416
[details]
Patch I confirmed that the new test fails in tip-of-tree webkit, passes in Chrome and Firefox, and is the correct behavior. Thanks!
Jinyoung Hur
Comment 14
2015-08-19 17:08:03 PDT
(In reply to
comment #13
)
> Comment on
attachment 259416
[details]
> Patch > > I confirmed that the new test fails in tip-of-tree webkit, passes in Chrome > and Firefox, and is the correct behavior. Thanks!
Nice!
Radar WebKit Bug Importer
Comment 15
2015-08-19 17:19:35 PDT
<
rdar://problem/22353988
>
WebKit Commit Bot
Comment 16
2015-08-19 17:27:09 PDT
Comment on
attachment 259416
[details]
Patch Clearing flags on attachment: 259416 Committed
r188666
: <
http://trac.webkit.org/changeset/188666
>
WebKit Commit Bot
Comment 17
2015-08-19 17:27:13 PDT
All reviewed patches have been landed. Closing bug.
Alex Christensen
Comment 18
2015-08-19 17:35:02 PDT
This fixed conformance/textures/texture-npot.html
Brent Fulgham
Comment 19
2015-08-19 18:03:15 PDT
(In reply to
comment #18
)
> This fixed conformance/textures/texture-npot.html
Hey! A PROGRESSION! Nice work Jinyoung!
Jinyoung Hur
Comment 20
2015-08-19 18:04:35 PDT
(In reply to
comment #19
)
> (In reply to
comment #18
) > > This fixed conformance/textures/texture-npot.html > > Hey! A PROGRESSION! > > Nice work Jinyoung!
Wow! Thanks!
Brent Fulgham
Comment 21
2016-03-21 17:11:43 PDT
***
Bug 100402
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug