Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • libANGLE
  • State.cpp
Find file
BlameHistoryPermalink
  • Jamie Madill's avatar
    Speculative fix for assertion failure with samplers. · b91d2630
    Jamie Madill authored Mar 24, 2020
    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: 's avatarCody Northrop <cnorthrop@google.com>
    b91d2630
State.cpp 103 KB
EditWeb IDE
×

Replace State.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.