diff options
| author | 2010-12-15 02:11:26 -0800 | |
|---|---|---|
| committer | 2010-12-15 02:11:26 -0800 | |
| commit | 1eb9f161a6f03cc8fc3a464a71a36e92bc79bd01 (patch) | |
| tree | 21f71a19faa0e03134ee7c66e1b3507e0fcd7c8a /libs/rs/rsAllocation.cpp | |
| parent | ee02d83e4963848efa0375ccfcde0455d47bb2ad (diff) | |
| parent | 6d8eb266dd398abf0511685fdaf98abba3396174 (diff) | |
Merge "Fix mipmap bug introduced with Allocation cleanup. Add syncAll to rsg headers."
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
| -rw-r--r-- | libs/rs/rsAllocation.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 78b570a02f8b..cb0022377bc5 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -191,13 +191,6 @@ void Allocation::uploadToTexture(const Context *rsc) { uploadCubeTexture(isFirstUpload); } - if (mMipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { -#ifndef ANDROID_RS_BUILD_FOR_HOST - glGenerateMipmap(target); -#endif //ANDROID_RS_BUILD_FOR_HOST - } - - if (!(mUsageFlags & RS_ALLOCATION_USAGE_SCRIPT)) { freeScriptMemory(); } @@ -227,6 +220,12 @@ void Allocation::upload2DTexture(bool isFirstUpload, const void *ptr) { format, type, p); } } + + if (mMipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { +#ifndef ANDROID_RS_BUILD_FOR_HOST + glGenerateMipmap(target); +#endif //ANDROID_RS_BUILD_FOR_HOST + } } void Allocation::uploadCubeTexture(bool isFirstUpload) { @@ -266,6 +265,12 @@ void Allocation::uploadCubeTexture(bool isFirstUpload) { } } } + + if (mMipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { +#ifndef ANDROID_RS_BUILD_FOR_HOST + glGenerateMipmap(target); +#endif //ANDROID_RS_BUILD_FOR_HOST + } } void Allocation::deferedUploadToBufferObject(const Context *rsc) { |