|
|
Created:
4 years, 10 months ago by magjed_webrtc Modified:
4 years, 10 months ago Reviewers:
hbos CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com Base URL:
https://chromium.googlesource.com/external/webrtc.git@master Target Ref:
refs/pending/heads/master Project:
webrtc Visibility:
Public. |
DescriptionAndroid GLShader: Check return value of glCreateShader()
This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release().
BUG=b/27197590
Committed: https://crrev.com/347c0bb5b50878d16a80732302707ccf90bd77cf
Cr-Commit-Position: refs/heads/master@{#11668}
Patch Set 1 #
Total comments: 4
Messages
Total messages: 13 (5 generated)
Description was changed from ========== Android GLShader: Check return value of glCreateShader() This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release(). BUG=b/27197590 ========== to ========== Android GLShader: Check return value of glCreateShader() This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release(). BUG=b/27197590 ==========
magjed@webrtc.org changed reviewers: + hbos@webrtc.org
hbos - Please take a look.
https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... File webrtc/api/java/android/org/webrtc/GlShader.java (right): https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... webrtc/api/java/android/org/webrtc/GlShader.java:72: GLES20.glDeleteShader(fragmentShader); The fact that it will be deleted when no longer attached explains why you can do this, but it looks confusing. What is the benefit to deleting here as opposed to in release()?
https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... File webrtc/api/java/android/org/webrtc/GlShader.java (right): https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... webrtc/api/java/android/org/webrtc/GlShader.java:72: GLES20.glDeleteShader(fragmentShader); On 2016/02/17 14:23:06, hbos wrote: > The fact that it will be deleted when no longer attached explains why you can do > this, but it looks confusing. What is the benefit to deleting here as opposed to > in release()? The fact that they will be deleted when no longer attached is not the reason that I can delete them here. In fact, I SHOULD be able detach them as well so that they are in fact deleted, but some ill-behaved drivers don't like that. Shader objects should exist for just long enough to successfully link a program object, and they are not needed after that. It's cleaner and less maintenance to delete them directly, because then we don't need to keep track of them.
lgtm https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... File webrtc/api/java/android/org/webrtc/GlShader.java (right): https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... webrtc/api/java/android/org/webrtc/GlShader.java:72: GLES20.glDeleteShader(fragmentShader); On 2016/02/18 10:05:19, magjed_webrtc wrote: > On 2016/02/17 14:23:06, hbos wrote: > > The fact that it will be deleted when no longer attached explains why you can > do > > this, but it looks confusing. What is the benefit to deleting here as opposed > to > > in release()? > > The fact that they will be deleted when no longer attached is not the reason > that I can delete them here. In fact, I SHOULD be able detach them as well so > that they are in fact deleted, but some ill-behaved drivers don't like that. > > Shader objects should exist for just long enough to successfully link a program > object, and they are not needed after that. It's cleaner and less maintenance to > delete them directly, because then we don't need to keep track of them. And detaching occurs automagically at glDeleteProgram? In that case, lgtm.
https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... File webrtc/api/java/android/org/webrtc/GlShader.java (right): https://codereview.webrtc.org/1702953002/diff/1/webrtc/api/java/android/org/w... webrtc/api/java/android/org/webrtc/GlShader.java:72: GLES20.glDeleteShader(fragmentShader); On 2016/02/18 10:35:54, hbos wrote: > On 2016/02/18 10:05:19, magjed_webrtc wrote: > > On 2016/02/17 14:23:06, hbos wrote: > > > The fact that it will be deleted when no longer attached explains why you > can > > do > > > this, but it looks confusing. What is the benefit to deleting here as > opposed > > to > > > in release()? > > > > The fact that they will be deleted when no longer attached is not the reason > > that I can delete them here. In fact, I SHOULD be able detach them as well so > > that they are in fact deleted, but some ill-behaved drivers don't like that. > > > > Shader objects should exist for just long enough to successfully link a > program > > object, and they are not needed after that. It's cleaner and less maintenance > to > > delete them directly, because then we don't need to keep track of them. > > And detaching occurs automagically at glDeleteProgram? In that case, lgtm. Yes, detaching occurs automagically in glDeleteProgram.
The CQ bit was checked by magjed@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1702953002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1702953002/1
Message was sent while issue was closed.
Description was changed from ========== Android GLShader: Check return value of glCreateShader() This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release(). BUG=b/27197590 ========== to ========== Android GLShader: Check return value of glCreateShader() This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release(). BUG=b/27197590 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Android GLShader: Check return value of glCreateShader() This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release(). BUG=b/27197590 ========== to ========== Android GLShader: Check return value of glCreateShader() This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release(). BUG=b/27197590 Committed: https://crrev.com/347c0bb5b50878d16a80732302707ccf90bd77cf Cr-Commit-Position: refs/heads/master@{#11668} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/347c0bb5b50878d16a80732302707ccf90bd77cf Cr-Commit-Position: refs/heads/master@{#11668} |