This was crashing for example here: https://chromium-swarm.appspot.com/task?id=4b174a9710848410 https://chromium-swarm.appspot.com/task?id=4b214baec2ee7e10 With this stack: libglesv2!gl::TextureState::isBoundAsSamplerTexture libglesv2!gl::Texture::onUnbindAsSamplerTexture libglesv2!gl::State::unsetActiveTexture+0x9 libglesv2!gl::State::updateActiveTextureState+0x2d2 libglesv2!gl::State::updateActiveTexture+0x3aa libglesv2!gl::State::setSamplerTexture+0x4a1 libglesv2!gl::Context::bindTexture+0x1ab libglesv2!gl::BindTexture+0x99 chrome!GrGLFunction+0x1f chrome!GrGLGpu::bindTexture+0x1a0 chrome!GrGLProgram::bindTextures+0x1b9 chrome!GrGLOpsRenderPass::onBindTextures+0x50 chrome!GrOpsRenderPass::bindTextures+0x106 chrome!GrOpFlushState::bindTextures+0xf chrome!`anonymous namespace'::FillRectOp::onExecute+0xd3 It's unclear how we could end up with a Texture bound that doesn't go through the normal setter functions. I did see a potential hole where textures might not get an unbind call when a Context is torn down. This could lead to bugs in multi-context situations. This protects the set/unset functions in a helper class to ensure we always call onBind/onUnbind and forces the destructor to call unbind. Bug: angleproject:4490 Change-Id: Ied64e02bbe3a37efcab6cbdd4bf2d1b6dcb8b3ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by:Cody Northrop <cnorthrop@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| cgl | Loading commit data... | |
| eagl | Loading commit data... | |
| egl | Loading commit data... | |
| glx | Loading commit data... | |
| wgl | Loading commit data... | |
| BlitGL.cpp | Loading commit data... | |
| BlitGL.h | Loading commit data... | |
| BufferGL.cpp | Loading commit data... | |
| BufferGL.h | Loading commit data... | |
| ClearMultiviewGL.cpp | Loading commit data... | |
| ClearMultiviewGL.h | Loading commit data... | |
| CompilerGL.cpp | Loading commit data... | |
| CompilerGL.h | Loading commit data... | |
| ContextGL.cpp | Loading commit data... | |
| ContextGL.h | Loading commit data... | |
| DispatchTableGL_autogen.cpp | Loading commit data... | |
| DispatchTableGL_autogen.h | Loading commit data... | |
| DisplayGL.cpp | Loading commit data... | |
| DisplayGL.h | Loading commit data... | |
| FeatureSupportGL.md | Loading commit data... | |
| FenceNVGL.cpp | Loading commit data... | |
| FenceNVGL.h | Loading commit data... | |
| FramebufferGL.cpp | Loading commit data... | |
| FramebufferGL.h | Loading commit data... | |
| FunctionsGL.cpp | Loading commit data... | |
| FunctionsGL.h | Loading commit data... | |
| ImageGL.cpp | Loading commit data... | |
| ImageGL.h | Loading commit data... | |
| MemoryObjectGL.cpp | Loading commit data... | |
| MemoryObjectGL.h | Loading commit data... | |
| ProgramGL.cpp | Loading commit data... | |
| ProgramGL.h | Loading commit data... | |
| ProgramPipelineGL.cpp | Loading commit data... | |
| ProgramPipelineGL.h | Loading commit data... | |
| QueryGL.cpp | Loading commit data... | |
| QueryGL.h | Loading commit data... | |
| RenderbufferGL.cpp | Loading commit data... | |
| RenderbufferGL.h | Loading commit data... | |
| RendererGL.cpp | Loading commit data... | |
| RendererGL.h | Loading commit data... | |
| SamplerGL.cpp | Loading commit data... | |
| SamplerGL.h | Loading commit data... | |
| SemaphoreGL.cpp | Loading commit data... | |
| SemaphoreGL.h | Loading commit data... | |
| ShaderGL.cpp | Loading commit data... | |
| ShaderGL.h | Loading commit data... | |
| StateManagerGL.cpp | Loading commit data... | |
| StateManagerGL.h | Loading commit data... | |
| SurfaceGL.cpp | Loading commit data... | |
| SurfaceGL.h | Loading commit data... | |
| SyncGL.cpp | Loading commit data... | |
| SyncGL.h | Loading commit data... | |
| TextureGL.cpp | Loading commit data... | |
| TextureGL.h | Loading commit data... | |
| TransformFeedbackGL.cpp | Loading commit data... | |
| TransformFeedbackGL.h | Loading commit data... | |
| VertexArrayGL.cpp | Loading commit data... | |
| VertexArrayGL.h | Loading commit data... | |
| formatutilsgl.cpp | Loading commit data... | |
| formatutilsgl.h | Loading commit data... | |
| functionsgl_enums.h | Loading commit data... | |
| functionsgl_typedefs.h | Loading commit data... | |
| generate_gl_dispatch_table.py | Loading commit data... | |
| gl_bindings_data.json | Loading commit data... | |
| null_functions.cpp | Loading commit data... | |
| null_functions.h | Loading commit data... | |
| renderergl_utils.cpp | Loading commit data... | |
| renderergl_utils.h | Loading commit data... |