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 |
|---|---|---|
| .. | ||
| converged | Loading commit data... | |
| shaders | Loading commit data... | |
| win32 | Loading commit data... | |
| winrt | Loading commit data... | |
| Blit11.cpp | Loading commit data... | |
| Blit11.h | Loading commit data... | |
| Blit11Helper_autogen.inc | Loading commit data... | |
| Buffer11.cpp | Loading commit data... | |
| Buffer11.h | Loading commit data... | |
| Clear11.cpp | Loading commit data... | |
| Clear11.h | Loading commit data... | |
| Context11.cpp | Loading commit data... | |
| Context11.h | Loading commit data... | |
| DebugAnnotator11.cpp | Loading commit data... | |
| DebugAnnotator11.h | Loading commit data... | |
| ExternalImageSiblingImpl11.cpp | Loading commit data... | |
| ExternalImageSiblingImpl11.h | Loading commit data... | |
| Fence11.cpp | Loading commit data... | |
| Fence11.h | Loading commit data... | |
| Framebuffer11.cpp | Loading commit data... | |
| Framebuffer11.h | Loading commit data... | |
| Image11.cpp | Loading commit data... | |
| Image11.h | Loading commit data... | |
| IndexBuffer11.cpp | Loading commit data... | |
| IndexBuffer11.h | Loading commit data... | |
| InputLayoutCache.cpp | Loading commit data... | |
| InputLayoutCache.h | Loading commit data... | |
| MappedSubresourceVerifier11.cpp | Loading commit data... | |
| MappedSubresourceVerifier11.h | Loading commit data... | |
| NativeWindow11.h | Loading commit data... | |
| PixelTransfer11.cpp | Loading commit data... | |
| PixelTransfer11.h | Loading commit data... | |
| Program11.cpp | Loading commit data... | |
| Program11.h | Loading commit data... | |
| ProgramPipeline11.cpp | Loading commit data... | |
| ProgramPipeline11.h | Loading commit data... | |
| Query11.cpp | Loading commit data... | |
| Query11.h | Loading commit data... | |
| RenderStateCache.cpp | Loading commit data... | |
| RenderStateCache.h | Loading commit data... | |
| RenderTarget11.cpp | Loading commit data... | |
| RenderTarget11.h | Loading commit data... | |
| Renderer11.cpp | Loading commit data... | |
| Renderer11.h | Loading commit data... | |
| ResourceManager11.cpp | Loading commit data... | |
| ResourceManager11.h | Loading commit data... | |
| ShaderExecutable11.cpp | Loading commit data... | |
| ShaderExecutable11.h | Loading commit data... | |
| StateManager11.cpp | Loading commit data... | |
| StateManager11.h | Loading commit data... | |
| StreamProducerD3DTexture.cpp | Loading commit data... | |
| StreamProducerD3DTexture.h | Loading commit data... | |
| SwapChain11.cpp | Loading commit data... | |
| SwapChain11.h | Loading commit data... | |
| TextureStorage11.cpp | Loading commit data... | |
| TextureStorage11.h | Loading commit data... | |
| TransformFeedback11.cpp | Loading commit data... | |
| TransformFeedback11.h | Loading commit data... | |
| Trim11.cpp | Loading commit data... | |
| Trim11.h | Loading commit data... | |
| VertexArray11.cpp | Loading commit data... | |
| VertexArray11.h | Loading commit data... | |
| VertexBuffer11.cpp | Loading commit data... | |
| VertexBuffer11.h | Loading commit data... | |
| d3d11_blit_shaders_autogen.gni | Loading commit data... | |
| dxgi_format_data.json | Loading commit data... | |
| dxgi_format_map_autogen.cpp | Loading commit data... | |
| dxgi_support_data.json | Loading commit data... | |
| dxgi_support_table.h | Loading commit data... | |
| dxgi_support_table_autogen.cpp | Loading commit data... | |
| formatutils11.cpp | Loading commit data... | |
| formatutils11.h | Loading commit data... | |
| gen_blit11helper.py | Loading commit data... | |
| gen_dxgi_format_table.py | Loading commit data... | |
| gen_dxgi_support_tables.py | Loading commit data... | |
| gen_texture_format_table.py | Loading commit data... | |
| renderer11_utils.cpp | Loading commit data... | |
| renderer11_utils.h | Loading commit data... | |
| texture_format_data.json | Loading commit data... | |
| texture_format_map.json | Loading commit data... | |
| texture_format_table.cpp | Loading commit data... | |
| texture_format_table.h | Loading commit data... | |
| texture_format_table_autogen.cpp | Loading commit data... | |
| texture_format_table_utils.h | Loading commit data... |