diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-07-19 11:01:37 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-07-19 11:34:04 +0200 |
commit | b64232d77bdf709e70504fcd449ddbd982efb2b2 (patch) | |
tree | 9aad20148c387486a847a6bd2a073ee5831e933e /components/script/dom/webglrenderingcontext.rs | |
parent | 8fabc6660aeff778b9ddfb96e2cc6ff5a0e03244 (diff) | |
download | servo-b64232d77bdf709e70504fcd449ddbd982efb2b2.tar.gz servo-b64232d77bdf709e70504fcd449ddbd982efb2b2.zip |
Invalidate all WebGLUniformLocation values on program relink
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 45923d1b27c..5e2f26748ac 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -436,7 +436,10 @@ impl WebGLRenderingContext { None => return, }; match self.current_program.get() { - Some(ref program) if program.id() == location.program_id() => {} + Some(ref program) if + program.id() == location.program_id() && + program.link_generation() == location.link_generation() + => {} _ => return self.webgl_error(InvalidOperation), } handle_potential_webgl_error!(self, f(location)); @@ -3612,7 +3615,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { ) -> JSVal { // FIXME(nox): https://github.com/servo/servo/issues/21133 - if program.is_deleted() || !program.is_linked() || program.id() != location.program_id() { + if + program.is_deleted() || + !program.is_linked() || + program.id() != location.program_id() || + program.link_generation() != location.link_generation() + { self.webgl_error(InvalidOperation); return NullValue(); } |