-
Notifications
You must be signed in to change notification settings - Fork 0
/
texture_compat.go
473 lines (435 loc) · 16.8 KB
/
texture_compat.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
// Copyright (C) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package gles
import (
"context"
"github.com/google/gapid/core/image"
"github.com/google/gapid/core/log"
"github.com/google/gapid/gapis/api"
"github.com/google/gapid/gapis/api/transform"
)
var luminanceSwizzle = map[GLenum]GLenum{
GLenum_GL_RED: GLenum_GL_RED,
GLenum_GL_GREEN: GLenum_GL_RED,
GLenum_GL_BLUE: GLenum_GL_RED,
GLenum_GL_ALPHA: GLenum_GL_ONE,
}
var alphaSwizzle = map[GLenum]GLenum{
GLenum_GL_RED: GLenum_GL_ZERO,
GLenum_GL_GREEN: GLenum_GL_ZERO,
GLenum_GL_BLUE: GLenum_GL_ZERO,
GLenum_GL_ALPHA: GLenum_GL_RED,
}
var luminanceAlphaSwizzle = map[GLenum]GLenum{
GLenum_GL_RED: GLenum_GL_RED,
GLenum_GL_GREEN: GLenum_GL_RED,
GLenum_GL_BLUE: GLenum_GL_RED,
GLenum_GL_ALPHA: GLenum_GL_GREEN,
}
var luminanceAlphaCompat = map[GLenum]struct {
rgFormat GLenum
compatSwizzle map[GLenum]GLenum
}{
GLenum_GL_LUMINANCE: {GLenum_GL_RED, luminanceSwizzle},
GLenum_GL_LUMINANCE8_EXT: {GLenum_GL_R8, luminanceSwizzle},
GLenum_GL_LUMINANCE16F_EXT: {GLenum_GL_R16F, luminanceSwizzle},
GLenum_GL_LUMINANCE32F_EXT: {GLenum_GL_R32F, luminanceSwizzle},
GLenum_GL_ALPHA: {GLenum_GL_RED, alphaSwizzle},
GLenum_GL_ALPHA8_EXT: {GLenum_GL_R8, alphaSwizzle},
GLenum_GL_ALPHA16F_EXT: {GLenum_GL_R16F, alphaSwizzle},
GLenum_GL_ALPHA32F_EXT: {GLenum_GL_R32F, alphaSwizzle},
GLenum_GL_LUMINANCE_ALPHA: {GLenum_GL_RG, luminanceAlphaSwizzle},
GLenum_GL_LUMINANCE8_ALPHA8_EXT: {GLenum_GL_RG8, luminanceAlphaSwizzle},
GLenum_GL_LUMINANCE_ALPHA16F_EXT: {GLenum_GL_RG16F, luminanceAlphaSwizzle},
GLenum_GL_LUMINANCE_ALPHA32F_EXT: {GLenum_GL_RG32F, luminanceAlphaSwizzle},
}
type textureCompat struct {
f features
v *Version
// Original user-defined swizzle which would be used without compatibility layer.
// (GL_TEXTURE_SWIZZLE_{R,G,B,A}, Texture) -> GL_{RED,GREEN,BLUE,ALPHA,ONE,ZERO}
origSwizzle map[GLenum]map[Textureʳ]GLenum
// Compatibility component remapping needed to support luminance/alpha formats.
// Texture -> (GL_{RED,GREEN,BLUE,ALPHA} -> GL_{RED,GREEN,ONE,ZERO})
compatSwizzle map[Textureʳ]map[GLenum]GLenum
}
// getSwizzle returns the original user-defined swizzle and the current swizzle from state.
func (tc *textureCompat) getSwizzle(t Textureʳ, parameter GLenum) (orig, curr GLenum) {
var init GLenum
switch parameter {
case GLenum_GL_TEXTURE_SWIZZLE_R:
init, curr = GLenum_GL_RED, t.SwizzleR()
case GLenum_GL_TEXTURE_SWIZZLE_G:
init, curr = GLenum_GL_GREEN, t.SwizzleG()
case GLenum_GL_TEXTURE_SWIZZLE_B:
init, curr = GLenum_GL_BLUE, t.SwizzleB()
case GLenum_GL_TEXTURE_SWIZZLE_A:
init, curr = GLenum_GL_ALPHA, t.SwizzleA()
}
if orig, ok := tc.origSwizzle[parameter][t]; ok {
return orig, curr
}
return init, curr
}
func (tc *textureCompat) writeCompatSwizzle(ctx context.Context, cb CommandBuilder, t Textureʳ, parameter GLenum, out transform.Writer, id api.CmdID) {
target := t.Kind()
orig, curr := tc.getSwizzle(t, parameter)
compat := orig
if compatSwizzle, ok := tc.compatSwizzle[t]; ok {
if v, ok := compatSwizzle[compat]; ok {
compat = v
}
}
if compat != curr {
out.MutateAndWrite(ctx, id.Derived(), cb.GlTexParameteri(target, parameter, GLint(compat)))
}
}
type glenumProperty struct {
get func() GLenum
set func(GLenum)
}
// Common handler for all glTex* methods.
// Arguments may be null if the given method does not use them.
func (tc *textureCompat) convertFormat(
ctx context.Context,
target GLenum,
internalformat, format, componentType *glenumProperty,
out transform.Writer,
id api.CmdID,
cmd api.Cmd) {
// Compressed formats are replaced by RGBA8
// TODO: What about SRGB?
if internalformat != nil && isCompressedFormat(internalformat.get()) {
if _, supported := tc.f.compressedTextureFormats[internalformat.get()]; !supported {
internalformat.set(GLenum_GL_RGBA8)
}
}
if tc.v.IsES {
return
}
// ES and desktop disagree how unsized internal formats are represented
// (floats in particular), so always explicitly use one of the sized formats.
if internalformat != nil && format != nil && componentType != nil && internalformat.get() == format.get() {
internalformat.set(getSizedFormatFromTuple(internalformat.get(), componentType.get()))
}
if internalformat != nil {
s := out.State()
switch target {
case GLenum_GL_TEXTURE_CUBE_MAP_POSITIVE_X, GLenum_GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GLenum_GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GLenum_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GLenum_GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GLenum_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
target = GLenum_GL_TEXTURE_CUBE_MAP
}
// Luminance/Alpha is not supported on desktop so convert it to R/G.
if t, err := subGetBoundTextureOrErrorInvalidEnum(ctx, nil, api.CmdNoID, nil, s, GetState(s), cmd.Thread(), nil, nil, target); err == nil {
if laCompat, ok := luminanceAlphaCompat[internalformat.get()]; ok {
internalformat.set(laCompat.rgFormat)
tc.compatSwizzle[t] = laCompat.compatSwizzle
} else {
// Remove the compat mapping and reset swizzles to the original values below.
delete(tc.compatSwizzle, t)
}
cb := CommandBuilder{Thread: cmd.Thread(), Arena: s.Arena}
tc.writeCompatSwizzle(ctx, cb, t, GLenum_GL_TEXTURE_SWIZZLE_R, out, id)
tc.writeCompatSwizzle(ctx, cb, t, GLenum_GL_TEXTURE_SWIZZLE_G, out, id)
tc.writeCompatSwizzle(ctx, cb, t, GLenum_GL_TEXTURE_SWIZZLE_B, out, id)
tc.writeCompatSwizzle(ctx, cb, t, GLenum_GL_TEXTURE_SWIZZLE_A, out, id)
}
switch internalformat.get() {
case GLenum_GL_BGRA8_EXT: // Not supported in GL 3.2
// The GPU order of channels is transparent to us, so we can just use RGBA instead.
internalformat.set(GLenum_GL_RGBA8)
case GLenum_GL_RGB565: // Not supported in GL 3.2
internalformat.set(GLenum_GL_RGB8)
case GLenum_GL_RGB10_A2UI: // Not supported in GL 3.2
internalformat.set(GLenum_GL_RGBA16UI)
case GLenum_GL_STENCIL_INDEX8: // TODO: not supported on desktop.
}
}
if format != nil {
// Luminance/Alpha is not supported on desktop so convert it to R/G.
switch format.get() {
case GLenum_GL_LUMINANCE, GLenum_GL_ALPHA:
format.set(GLenum_GL_RED)
case GLenum_GL_LUMINANCE_ALPHA:
format.set(GLenum_GL_RG)
}
}
if componentType != nil {
// Half-float is a core feature on desktop (with different enum value)
if componentType.get() == GLenum_GL_HALF_FLOAT_OES {
componentType.set(GLenum_GL_HALF_FLOAT)
}
}
}
func (tc *textureCompat) postTexParameter(ctx context.Context, target, parameter GLenum, out transform.Writer, id api.CmdID, cmd api.Cmd) {
if tc.v.IsES {
return
}
s := out.State()
switch parameter {
case GLenum_GL_TEXTURE_SWIZZLE_R, GLenum_GL_TEXTURE_SWIZZLE_G, GLenum_GL_TEXTURE_SWIZZLE_B, GLenum_GL_TEXTURE_SWIZZLE_A:
if t, err := subGetBoundTextureOrErrorInvalidEnum(ctx, nil, api.CmdNoID, nil, s, GetState(s), cmd.Thread(), nil, nil, target); err == nil {
_, curr := tc.getSwizzle(t, parameter)
// The tex parameter was recently mutated, so set the original swizzle from current state.
tc.origSwizzle[parameter][t] = curr
// Combine the original and compat swizzles and write out the commands to set it.
cb := CommandBuilder{Thread: cmd.Thread(), Arena: s.Arena}
tc.writeCompatSwizzle(ctx, cb, t, parameter, out, id)
}
case GLenum_GL_TEXTURE_SWIZZLE_RGBA:
log.E(ctx, "Unexpected GL_TEXTURE_SWIZZLE_RGBA")
}
}
// decompressTexImage2D writes a glTexImage2D using the decompressed data for
// the given glCompressedTexImage2D.
func decompressTexImage2D(ctx context.Context, i api.CmdID, a *GlCompressedTexImage2D, s *api.GlobalState, out transform.Writer) error {
ctx = log.Enter(ctx, "decompressTexImage2D")
dID := i.Derived()
c := GetContext(s, a.Thread())
cb := CommandBuilder{Thread: a.Thread(), Arena: s.Arena}
data := AsU8ˢ(s.Arena, a.Data().Slice(0, uint64(a.ImageSize()), s.MemoryLayout), s.MemoryLayout)
if pb := c.Bound().PixelUnpackBuffer(); !pb.IsNil() {
offset := a.Data().Address()
data = pb.Data().Slice(offset, offset+uint64(a.ImageSize()))
out.MutateAndWrite(ctx, dID, cb.GlBindBuffer(GLenum_GL_PIXEL_UNPACK_BUFFER, 0))
defer out.MutateAndWrite(ctx, dID, cb.GlBindBuffer(GLenum_GL_PIXEL_UNPACK_BUFFER, pb.ID()))
} else {
a.Extras().Observations().ApplyReads(s.Memory.ApplicationPool())
}
format, err := getCompressedImageFormat(a.Internalformat())
if err != nil {
return err
}
src := image.Info{
Bytes: image.NewID(data.ResourceID(ctx, s)),
Width: uint32(a.Width()),
Height: uint32(a.Height()),
Depth: 1,
Format: format,
}
dst, err := src.Convert(ctx, image.RGBA_U8_NORM)
if err != nil {
return err
}
dstSize := a.Width() * a.Height() * 4
tmp := s.AllocOrPanic(ctx, uint64(dstSize))
out.MutateAndWrite(ctx, i, cb.GlTexImage2D(
a.Target(),
a.Level(),
GLint(GLenum_GL_RGBA8),
a.Width(),
a.Height(),
a.Border(),
GLenum_GL_RGBA,
GLenum_GL_UNSIGNED_BYTE,
tmp.Ptr(),
).AddRead(tmp.Range(), dst.Bytes.ID()))
tmp.Free()
return nil
}
// decompressTexSubImage2D writes a glTexSubImage2D using the decompressed data for
// the given glCompressedTexSubImage2D.
func decompressTexSubImage2D(ctx context.Context, i api.CmdID, a *GlCompressedTexSubImage2D, s *api.GlobalState, out transform.Writer) error {
ctx = log.Enter(ctx, "decompressTexSubImage2D")
dID := i.Derived()
c := GetContext(s, a.Thread())
cb := CommandBuilder{Thread: a.Thread(), Arena: s.Arena}
data := AsU8ˢ(s.Arena, a.Data().Slice(0, uint64(a.ImageSize()), s.MemoryLayout), s.MemoryLayout)
if pb := c.Bound().PixelUnpackBuffer(); !pb.IsNil() {
offset := a.Data().Address()
data = pb.Data().Slice(offset, offset+uint64(a.ImageSize()))
out.MutateAndWrite(ctx, dID, cb.GlBindBuffer(GLenum_GL_PIXEL_UNPACK_BUFFER, 0))
defer out.MutateAndWrite(ctx, dID, cb.GlBindBuffer(GLenum_GL_PIXEL_UNPACK_BUFFER, pb.ID()))
} else {
a.Extras().Observations().ApplyReads(s.Memory.ApplicationPool())
}
format, err := getCompressedImageFormat(a.Internalformat())
if err != nil {
return err
}
src := image.Info{
Bytes: image.NewID(data.ResourceID(ctx, s)),
Width: uint32(a.Width()),
Height: uint32(a.Height()),
Depth: 1,
Format: format,
}
dst, err := src.Convert(ctx, image.RGBA_U8_NORM)
if err != nil {
return err
}
dstSize := a.Width() * a.Height() * 4
tmp := s.AllocOrPanic(ctx, uint64(dstSize))
out.MutateAndWrite(ctx, i, cb.GlTexSubImage2D(
a.Target(),
a.Level(),
a.Xoffset(),
a.Yoffset(),
a.Width(),
a.Height(),
GLenum_GL_RGBA,
GLenum_GL_UNSIGNED_BYTE,
tmp.Ptr(),
).AddRead(tmp.Range(), dst.Bytes.ID()))
tmp.Free()
return nil
}
// getSupportedCompressedTextureFormats returns the set of supported compressed
// texture formats for a given extension list.
func getSupportedCompressedTextureFormats(v *Version, extensions extensions) map[GLenum]struct{} {
supported := map[GLenum]struct{}{}
for extension := range extensions {
for _, format := range getExtensionTextureFormats(extension) {
supported[format] = struct{}{}
}
}
if v.AtLeastES(3, 0) || v.AtLeastGL(4, 3) {
supported[GLenum_GL_COMPRESSED_R11_EAC] = struct{}{}
supported[GLenum_GL_COMPRESSED_SIGNED_R11_EAC] = struct{}{}
supported[GLenum_GL_COMPRESSED_RG11_EAC] = struct{}{}
supported[GLenum_GL_COMPRESSED_SIGNED_RG11_EAC] = struct{}{}
supported[GLenum_GL_COMPRESSED_RGB8_ETC2] = struct{}{}
supported[GLenum_GL_COMPRESSED_SRGB8_ETC2] = struct{}{}
supported[GLenum_GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2] = struct{}{}
supported[GLenum_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2] = struct{}{}
supported[GLenum_GL_COMPRESSED_RGBA8_ETC2_EAC] = struct{}{}
supported[GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC] = struct{}{}
}
return supported
}
// getExtensionTextureFormats returns the list of compressed texture formats
// enabled by a given extension
func getExtensionTextureFormats(extension string) []GLenum {
switch extension {
case "GL_AMD_compressed_ATC_texture":
return []GLenum{
GLenum_GL_ATC_RGB_AMD,
GLenum_GL_ATC_RGBA_EXPLICIT_ALPHA_AMD,
GLenum_GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD,
}
case "GL_OES_compressed_ETC1_RGB8_texture":
return []GLenum{
GLenum_GL_ETC1_RGB8_OES,
}
case "GL_EXT_texture_compression_dxt1":
return []GLenum{
GLenum_GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
}
case "GL_EXT_texture_compression_s3tc", "GL_NV_texture_compression_s3tc":
return []GLenum{
GLenum_GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
}
case "GL_KHR_texture_compression_astc_ldr":
return []GLenum{
GLenum_GL_COMPRESSED_RGBA_ASTC_4x4_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_5x4_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_5x5_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_6x5_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_6x6_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_8x5_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_8x6_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_8x8_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x5_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x6_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x8_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x10_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_12x10_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_12x12_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,
}
case "GL_EXT_texture_compression_latc", "GL_NV_texture_compression_latc":
return []GLenum{
GLenum_GL_COMPRESSED_LUMINANCE_LATC1_EXT,
GLenum_GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT,
GLenum_GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,
GLenum_GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT,
}
default:
return []GLenum{}
}
}
func isCompressedFormat(internalformat GLenum) bool {
switch internalformat {
case
GLenum_GL_ATC_RGBA_EXPLICIT_ALPHA_AMD,
GLenum_GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD,
GLenum_GL_ATC_RGB_AMD,
GLenum_GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,
GLenum_GL_COMPRESSED_LUMINANCE_LATC1_EXT,
GLenum_GL_COMPRESSED_RG11_EAC,
GLenum_GL_COMPRESSED_RGB8_ETC2,
GLenum_GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
GLenum_GL_COMPRESSED_RGBA8_ETC2_EAC,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x10_KHR,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x5,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x6,
GLenum_GL_COMPRESSED_RGBA_ASTC_10x8,
GLenum_GL_COMPRESSED_RGBA_ASTC_12x10,
GLenum_GL_COMPRESSED_RGBA_ASTC_12x12,
GLenum_GL_COMPRESSED_RGBA_ASTC_4x4,
GLenum_GL_COMPRESSED_RGBA_ASTC_5x4,
GLenum_GL_COMPRESSED_RGBA_ASTC_5x5,
GLenum_GL_COMPRESSED_RGBA_ASTC_6x5,
GLenum_GL_COMPRESSED_RGBA_ASTC_6x6,
GLenum_GL_COMPRESSED_RGBA_ASTC_8x5,
GLenum_GL_COMPRESSED_RGBA_ASTC_8x6,
GLenum_GL_COMPRESSED_RGBA_ASTC_8x8,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
GLenum_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
GLenum_GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
GLenum_GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT,
GLenum_GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT,
GLenum_GL_COMPRESSED_SIGNED_R11_EAC,
GLenum_GL_COMPRESSED_SIGNED_RG11_EAC,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8,
GLenum_GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
GLenum_GL_COMPRESSED_SRGB8_ETC2,
GLenum_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
GLenum_GL_ETC1_RGB8_OES:
return true
}
return false
}