@@ -110,10 +110,6 @@ void LatteTextureGL::GetOpenGLFormatInfo(bool isDepth, Latte::E_GX2SURFFMT forma
110
110
sint32 glInternalFormat;
111
111
sint32 glSuppliedFormat;
112
112
sint32 glSuppliedFormatType;
113
- // check if compressed textures should be used
114
- bool allowCompressedGLFormat = true ;
115
- if (LatteGPUState.glVendor == GLVENDOR_INTEL_LEGACY)
116
- allowCompressedGLFormat = false ; // compressed formats seem to cause more harm than good on Intel
117
113
// get format information
118
114
if (format == Latte::E_GX2SURFFMT::R4_G4_UNORM)
119
115
{
@@ -149,20 +145,11 @@ void LatteTextureGL::GetOpenGLFormatInfo(bool isDepth, Latte::E_GX2SURFFMT forma
149
145
else if (format == Latte::E_GX2SURFFMT::BC1_UNORM ||
150
146
format == Latte::E_GX2SURFFMT::BC1_SRGB)
151
147
{
152
- if (allowCompressedGLFormat)
153
- {
154
- if (format == Latte::E_GX2SURFFMT::BC1_SRGB)
155
- formatInfoOut->setCompressed (GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, -1 , -1 );
156
- else
157
- formatInfoOut->setCompressed (GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, -1 , -1 );
158
- return ;
159
- }
148
+ if (format == Latte::E_GX2SURFFMT::BC1_SRGB)
149
+ formatInfoOut->setCompressed (GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, -1 , -1 );
160
150
else
161
- {
162
- formatInfoOut->setFormat (GL_RGBA16F, GL_RGBA, GL_FLOAT);
163
- formatInfoOut->markAsAlternativeFormat ();
164
- return ;
165
- }
151
+ formatInfoOut->setCompressed (GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, -1 , -1 );
152
+ return ;
166
153
}
167
154
else if (format == Latte::E_GX2SURFFMT::BC2_UNORM || format == Latte::E_GX2SURFFMT::BC2_SRGB)
168
155
{
@@ -173,28 +160,18 @@ void LatteTextureGL::GetOpenGLFormatInfo(bool isDepth, Latte::E_GX2SURFFMT forma
173
160
}
174
161
else if (format == Latte::E_GX2SURFFMT::BC3_UNORM || format == Latte::E_GX2SURFFMT::BC3_SRGB)
175
162
{
176
- if (allowCompressedGLFormat)
177
- {
178
- if (format == Latte::E_GX2SURFFMT::BC3_SRGB)
179
- formatInfoOut->setCompressed (GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, -1 , -1 );
180
- else
181
- formatInfoOut->setCompressed (GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, -1 , -1 );
182
- return ;
183
- }
163
+ if (format == Latte::E_GX2SURFFMT::BC3_SRGB)
164
+ formatInfoOut->setCompressed (GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, -1 , -1 );
184
165
else
185
- {
186
- // todo: SRGB support
187
- formatInfoOut->setFormat (GL_RGBA16F, GL_RGBA, GL_FLOAT);
188
- formatInfoOut->markAsAlternativeFormat ();
189
- return ;
190
- }
166
+ formatInfoOut->setCompressed (GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, -1 , -1 );
167
+ return ;
191
168
}
192
169
else if (format == Latte::E_GX2SURFFMT::BC4_UNORM || format == Latte::E_GX2SURFFMT::BC4_SNORM)
193
170
{
171
+ bool allowCompressed = true ;
194
172
if (dim != Latte::E_DIM::DIM_2D && dim != Latte::E_DIM::DIM_2D_ARRAY)
195
- allowCompressedGLFormat = false ; // RGTC1 does not support non-2D textures
196
-
197
- if (allowCompressedGLFormat)
173
+ allowCompressed = false ; // RGTC1 does not support non-2D textures
174
+ if (allowCompressed)
198
175
{
199
176
if (format == Latte::E_GX2SURFFMT::BC4_UNORM)
200
177
formatInfoOut->setCompressed (GL_COMPRESSED_RED_RGTC1, -1 , -1 );
@@ -211,20 +188,11 @@ void LatteTextureGL::GetOpenGLFormatInfo(bool isDepth, Latte::E_GX2SURFFMT forma
211
188
}
212
189
else if (format == Latte::E_GX2SURFFMT::BC5_UNORM || format == Latte::E_GX2SURFFMT::BC5_SNORM)
213
190
{
214
- if (allowCompressedGLFormat)
215
- {
216
- if (format == Latte::E_GX2SURFFMT::BC5_SNORM)
217
- formatInfoOut->setCompressed (GL_COMPRESSED_SIGNED_RG_RGTC2, -1 , -1 );
218
- else
219
- formatInfoOut->setCompressed (GL_COMPRESSED_RG_RGTC2, -1 , -1 );
220
- return ;
221
- }
191
+ if (format == Latte::E_GX2SURFFMT::BC5_SNORM)
192
+ formatInfoOut->setCompressed (GL_COMPRESSED_SIGNED_RG_RGTC2, -1 , -1 );
222
193
else
223
- {
224
- formatInfoOut->setFormat (GL_RG16F, GL_RG, GL_FLOAT);
225
- formatInfoOut->markAsAlternativeFormat ();
226
- return ;
227
- }
194
+ formatInfoOut->setCompressed (GL_COMPRESSED_RG_RGTC2, -1 , -1 );
195
+ return ;
228
196
}
229
197
else if (format == Latte::E_GX2SURFFMT::R32_FLOAT)
230
198
{
0 commit comments