mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Reduce GL texture format support to the ES minimum. We have to handle these anyway so let's only have one path.
This commit is contained in:
@@ -64,29 +64,6 @@ bool Thin3DFormatToFormatAndType(DataFormat fmt, GLuint &internalFormat, GLuint
|
||||
alignment = 16;
|
||||
break;
|
||||
|
||||
#ifndef USING_GLES2
|
||||
case DataFormat::A4R4G4B4_UNORM_PACK16:
|
||||
internalFormat = GL_RGBA;
|
||||
format = GL_RGBA;
|
||||
type = GL_UNSIGNED_SHORT_4_4_4_4_REV;
|
||||
alignment = 2;
|
||||
break;
|
||||
|
||||
case DataFormat::R5G6B5_UNORM_PACK16:
|
||||
internalFormat = GL_RGB;
|
||||
format = GL_RGB;
|
||||
type = GL_UNSIGNED_SHORT_5_6_5_REV;
|
||||
alignment = 2;
|
||||
break;
|
||||
|
||||
case DataFormat::A1R5G5B5_UNORM_PACK16:
|
||||
internalFormat = GL_RGBA;
|
||||
format = GL_RGBA;
|
||||
type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||
alignment = 2;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1213,12 +1213,10 @@ void OpenGLContext::GetFramebufferDimensions(Framebuffer *fbo, int *w, int *h) {
|
||||
uint32_t OpenGLContext::GetDataFormatSupport(DataFormat fmt) const {
|
||||
switch (fmt) {
|
||||
case DataFormat::B8G8R8A8_UNORM:
|
||||
return FMT_RENDERTARGET | FMT_TEXTURE | FMT_AUTOGEN_MIPS;
|
||||
case DataFormat::B4G4R4A4_UNORM_PACK16:
|
||||
case DataFormat::B5G6R5_UNORM_PACK16:
|
||||
case DataFormat::B5G5R5A1_UNORM_PACK16:
|
||||
return FMT_RENDERTARGET | FMT_TEXTURE | FMT_AUTOGEN_MIPS; // native support
|
||||
case DataFormat::A4R4G4B4_UNORM_PACK16:
|
||||
// Can support this if _REV formats are supported.
|
||||
return gl_extensions.IsGLES ? 0 : FMT_TEXTURE;
|
||||
|
||||
case DataFormat::R8G8B8A8_UNORM:
|
||||
return FMT_RENDERTARGET | FMT_TEXTURE | FMT_INPUTLAYOUT | FMT_AUTOGEN_MIPS;
|
||||
|
||||
Reference in New Issue
Block a user