am 66358e24
: am 9dab667e
: Force a crash under conditions where white square bug in all apps is likely to occur.
Merge commit '66358e24a6bbc2017c2edd921a64e616b4c9cac4' into eclair-mr2-plus-aosp * commit '66358e24a6bbc2017c2edd921a64e616b4c9cac4': Force a crash under conditions where white square bug in all apps is likely to occur.
This commit is contained in:
@ -88,7 +88,7 @@ bool Allocation::fixAllocation()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Allocation::uploadToTexture(uint32_t lodOffset)
|
void Allocation::uploadToTexture(Context *rsc, uint32_t lodOffset)
|
||||||
{
|
{
|
||||||
//rsAssert(!mTextureId);
|
//rsAssert(!mTextureId);
|
||||||
rsAssert(lodOffset < mType->getLODCount());
|
rsAssert(lodOffset < mType->getLODCount());
|
||||||
@ -102,6 +102,15 @@ void Allocation::uploadToTexture(uint32_t lodOffset)
|
|||||||
|
|
||||||
if (!mTextureID) {
|
if (!mTextureID) {
|
||||||
glGenTextures(1, &mTextureID);
|
glGenTextures(1, &mTextureID);
|
||||||
|
|
||||||
|
if (!mTextureID) {
|
||||||
|
// This should not happen, however, its likely the cause of the
|
||||||
|
// white sqare bug.
|
||||||
|
// Force a crash to 1: restart the app, 2: make sure we get a bugreport.
|
||||||
|
LOGE("Upload to texture failed to gen mTextureID");
|
||||||
|
rsc->dumpDebug();
|
||||||
|
((char *)0)[0] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glBindTexture(GL_TEXTURE_2D, mTextureID);
|
glBindTexture(GL_TEXTURE_2D, mTextureID);
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||||
@ -238,7 +247,7 @@ RsAllocation rsi_AllocationCreateSized(Context *rsc, RsElement e, size_t count)
|
|||||||
void rsi_AllocationUploadToTexture(Context *rsc, RsAllocation va, uint32_t baseMipLevel)
|
void rsi_AllocationUploadToTexture(Context *rsc, RsAllocation va, uint32_t baseMipLevel)
|
||||||
{
|
{
|
||||||
Allocation *alloc = static_cast<Allocation *>(va);
|
Allocation *alloc = static_cast<Allocation *>(va);
|
||||||
alloc->uploadToTexture(baseMipLevel);
|
alloc->uploadToTexture(rsc, baseMipLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rsi_AllocationUploadToBufferObject(Context *rsc, RsAllocation va)
|
void rsi_AllocationUploadToBufferObject(Context *rsc, RsAllocation va)
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
void * getPtr() const {return mPtr;}
|
void * getPtr() const {return mPtr;}
|
||||||
const Type * getType() const {return mType.get();}
|
const Type * getType() const {return mType.get();}
|
||||||
|
|
||||||
void uploadToTexture(uint32_t lodOffset = 0);
|
void uploadToTexture(Context *rsc, uint32_t lodOffset = 0);
|
||||||
uint32_t getTextureID() const {return mTextureID;}
|
uint32_t getTextureID() const {return mTextureID;}
|
||||||
|
|
||||||
void uploadToBufferObject();
|
void uploadToBufferObject();
|
||||||
|
@ -726,6 +726,24 @@ void Context::deinitToClient()
|
|||||||
mIO.mToClient.shutdown();
|
mIO.mToClient.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Context::dumpDebug() const
|
||||||
|
{
|
||||||
|
LOGE("RS Context debug %p", this);
|
||||||
|
LOGE("RS Context debug");
|
||||||
|
|
||||||
|
LOGE(" EGL ver %i %i", mEGL.mMajorVersion, mEGL.mMinorVersion);
|
||||||
|
LOGE(" EGL context %p surface %p, w=%i h=%i Display=%p", mEGL.mContext,
|
||||||
|
mEGL.mSurface, mEGL.mWidth, mEGL.mHeight, mEGL.mDisplay);
|
||||||
|
LOGE(" GL vendor: %s", mGL.mVendor);
|
||||||
|
LOGE(" GL renderer: %s", mGL.mRenderer);
|
||||||
|
LOGE(" GL Version: %s", mGL.mVersion);
|
||||||
|
LOGE(" GL Extensions: %s", mGL.mExtensions);
|
||||||
|
LOGE(" GL int Versions %i %i", mGL.mMajorVersion, mGL.mMinorVersion);
|
||||||
|
LOGE(" RS width %i, height %i", mWidth, mHeight);
|
||||||
|
LOGE(" RS running %i, exit %i, useDepth %i, paused %i", mRunning, mExit, mUseDepth, mPaused);
|
||||||
|
LOGE(" RS pThreadID %li, nativeThreadID %i", mThreadId, mNativeThreadId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -162,6 +162,8 @@ public:
|
|||||||
bool mLogObjects;
|
bool mLogObjects;
|
||||||
} props;
|
} props;
|
||||||
|
|
||||||
|
void dumpDebug() const;
|
||||||
|
|
||||||
mutable const ObjectBase * mObjHead;
|
mutable const ObjectBase * mObjHead;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Reference in New Issue
Block a user