Scale up non-multiple-of-4 dxt textures
D3D doesn't support DXT textures that aren't a multiple of 4 in size, so multiply the sizes by 2 or 4 so they work. Then ensure sampler parameters are set up correctly so they don't sample the unuploaded miplevels.
BUG=https://code.google.com/p/angleproject/issues/detail?id=237
TEST=
Review URL: https://codereview.appspot.com/6287045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1222 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Texture.h b/src/libGLESv2/Texture.h
index ccddf57..6d67df7 100644
--- a/src/libGLESv2/Texture.h
+++ b/src/libGLESv2/Texture.h
@@ -150,6 +150,10 @@
DWORD getUsage() const;
unsigned int getTextureSerial() const;
virtual unsigned int getRenderTargetSerial(GLenum target) const = 0;
+ int getLodOffset() const;
+
+ protected:
+ int mLodOffset;
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage);
@@ -204,6 +208,7 @@
unsigned int getRenderTargetSerial(GLenum target);
bool isImmutable() const;
+ int getLodOffset();
static const GLuint INCOMPLETE_TEXTURE_ID = static_cast<GLuint>(-1); // Every texture takes an id at creation time. The value is arbitrary because it is never registered with the resource manager.
@@ -427,4 +432,4 @@
};
}
-#endif // LIBGLESV2_TEXTURE_H_
\ No newline at end of file
+#endif // LIBGLESV2_TEXTURE_H_