From 3b7d39bb51f851ddee441fa34884495217e477f9 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Mon, 14 Dec 2009 12:57:40 -0800 Subject: Implement RS tracked defered texture and buffer object uploads. --- libs/rs/rsAllocation.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libs/rs/rsAllocation.h') 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 @@ public: 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 @@ public: virtual void dumpLOGV(const char *prefix) const; + virtual void uploadCheck(const Context *rsc); + protected: void sendDirty() const; @@ -94,6 +98,7 @@ protected: // 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 @@ protected: // is allowed. bool mIsVertexBuffer; uint32_t mBufferID; + + bool mUploadDefered; }; } -- cgit v1.1