Implement RS tracked defered texture and buffer object uploads.
diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h
index 490abcf..f0b2122 100644
--- a/libs/rs/rsAllocation.h
+++ b/libs/rs/rsAllocation.h
@@ -46,10 +46,12 @@
void * getPtr() const {return mPtr;}
const Type * getType() const {return mType.get();}
- void uploadToTexture(Context *rsc, uint32_t lodOffset = 0);
+ void deferedUploadToTexture(const Context *rsc, uint32_t lodOffset);
+ void uploadToTexture(const Context *rsc);
uint32_t getTextureID() const {return mTextureID;}
- void uploadToBufferObject();
+ void deferedUploadToBufferObject(const Context *rsc);
+ void uploadToBufferObject(const Context *rsc);
uint32_t getBufferObjectID() const {return mBufferID;}
@@ -70,6 +72,8 @@
virtual void dumpLOGV(const char *prefix) const;
+ virtual void uploadCheck(const Context *rsc);
+
protected:
void sendDirty() const;
@@ -94,6 +98,7 @@
// Is this a legal structure to be used as a texture source.
// Initially this will require 1D or 2D and color data
bool mIsTexture;
+ uint32_t mTextureLOD;
uint32_t mTextureID;
// Is this a legal structure to be used as a vertex source.
@@ -101,6 +106,8 @@
// is allowed.
bool mIsVertexBuffer;
uint32_t mBufferID;
+
+ bool mUploadDefered;
};
}