Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(105)

Issue 2233045: Texture2D::getRenderTarget does not assume that needsRenderTarget succeeded....

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 11 months ago by apatrick1
Modified:
14 years, 11 months ago
Reviewers:
dgkoch
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Texture2D::getRenderTarget does not assume that needsRenderTarget succeeded. Specifically, it checks that mTexture is not null. This is to fix this crash that has been happening out in the wild: 0x01444822 [libGLESv2.dll - texture.cpp:1417] gl::Texture2D::getRenderTarget(unsigned int) 0x01445615 [libGLESv2.dll - texture.cpp:2048] gl::Texture::TextureColorbufferProxy::getRenderTarget() 0x01453bb0 [libGLESv2.dll - context.cpp:1579] gl::Context::applyRenderTarget(bool) 0x01455395 [libGLESv2.dll - context.cpp:2413] gl::Context::clear(unsigned int) 0x014460c4 [libGLESv2.dll - libglesv2.cpp:611] glClear 0x01c53b75 [chrome.dll - gles2_cmd_decoder.cc:3021] gpu::gles2::GLES2DecoderImpl::ClearUnclearedRenderbuffers(unsigned int,gpu::gles2::FramebufferManager::FramebufferInfo *) 0x01c53cee [chrome.dll - gles2_cmd_decoder.cc:3078] gpu::gles2::GLES2DecoderImpl::DoFramebufferTexture2D(unsigned int,unsigned int,unsigned int,unsigned int,int) 0x01c57c7d [chrome.dll - gles2_cmd_decoder_autogen.h:756] gpu::gles2::GLES2DecoderImpl::HandleFramebufferTexture2D(unsigned int,gpu::gles2::FramebufferTexture2D const &) 0x01c52197 [chrome.dll - gles2_cmd_decoder.cc:2214] gpu::gles2::GLES2DecoderImpl::DoCommand(unsigned int,unsigned int,void const *) 0x01c4fa78 [chrome.dll - cmd_parser.cc:56] gpu::CommandParser::ProcessCommand() 0x01c4f8ba [chrome.dll - gpu_processor.cc:100] gpu::GPUProcessor::ProcessCommands() It was a Windows XP service pack 3 box with Chrome 7.0.524.0. ANGLE was at r418 in this build. I suspect it attempted to glClear after a device lost, which caused needsRenderTarget to fail. This will hopefully patch it up so it doesn't crash. We'll need to check we aren't assuming mTexture is not null elsewhere.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M src/libGLESv2/Texture.cpp View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2
apatrick1
A quick one. But can you take a look and see if you agree that ...
14 years, 11 months ago (2010-09-16 20:36:54 UTC) #1
dgkoch
14 years, 11 months ago (2010-09-17 19:49:22 UTC) #2
Hi Al,

It seems fairly likely that this is a lost device issue.  

I think more than this will be necessary to ensure that there are no
dereferences of a null mTexture.   Not to mention you also need to make sure to
check the result from getRenderTarget then as well.

So.. this is a start, but at a minium, you'd want exactly the same fix in
TextureCubeMap::getRenderTarget.

We'll do an audit pass over Texture.cpp looking for similar issues.

Daniel
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b