WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137689
gl.detachShader breaks shader program
https://bugs.webkit.org/show_bug.cgi?id=137689
Summary
gl.detachShader breaks shader program
huscar
Reported
2014-10-14 04:50:14 PDT
Calling gl.detachShader after linking results in a program that doesn't draw anything (without error messages to the console). AFAIK this should not happen and using detachShader and deleteShader is encouraged to reduce memory usage. Here's a good test from when firefox had similar problems
https://bugzilla.mozilla.org/show_bug.cgi?id=867253
Attachments
Testcase
(2.79 KB, text/html)
2017-08-23 18:15 PDT
,
Dean Jackson
no flags
Details
Testcase
(2.66 KB, text/html)
2017-09-07 17:57 PDT
,
Dean Jackson
no flags
Details
Patch
(14.96 KB, patch)
2017-09-08 19:05 PDT
,
Dean Jackson
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-08-22 16:57:50 PDT
<
rdar://problem/34025056
>
Dean Jackson
Comment 2
2017-08-23 18:15:28 PDT
I am unable to reproduce this. See the attached test case which both detaches and deletes the shaders after linking the program, but before they are used in a draw call (and before they are used to get attribute and uniform locations).
Dean Jackson
Comment 3
2017-08-23 18:15:51 PDT
Created
attachment 318952
[details]
Testcase
Dean Jackson
Comment 4
2017-08-23 18:17:38 PDT
Also, the original demo on flohofwoe doesn't seem to work any more, in any browser. It also downloads rather than running directly.
Dean Jackson
Comment 5
2017-09-07 15:20:07 PDT
Oops. My test case is bad. This is really broken.
Dean Jackson
Comment 6
2017-09-07 17:57:14 PDT
Created
attachment 320217
[details]
Testcase Better testcase. The triangle should be red.
Dean Jackson
Comment 7
2017-09-08 19:05:03 PDT
Created
attachment 320329
[details]
Patch
Sam Weinig
Comment 8
2017-09-08 20:20:05 PDT
Comment on
attachment 320329
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=320329&action=review
> Source/WebCore/ChangeLog:20 > + This fixes the bug, but the whole area is still a bit messy. For one, > + we're keeping around all the shader information even after it is > + no longer used.
Seems like we should have a bug tracking this issue.
> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:996 > + LinkedShaderMap::iterator result = m_linkedShaderMap.find(program);
Use auto here?
> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1053 > + LinkedShaderMap::iterator result = m_linkedShaderMap.find(program);
auto?
Dean Jackson
Comment 9
2017-09-09 15:52:52 PDT
(In reply to Sam Weinig from
comment #8
)
> > Seems like we should have a bug tracking this issue. >
https://bugs.webkit.org/show_bug.cgi?id=98204
Dean Jackson
Comment 10
2017-09-09 15:55:00 PDT
Committed
r221831
: <
http://trac.webkit.org/changeset/221831
>
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