blob: d62a310fc6505b4f2bd260c2395a11ecc99886cd [file] [log] [blame]
bsalomon@google.comf7fa8062012-02-14 14:09:57 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8
9#include "GrGLCaps.h"
robertphillips@google.com6177e692013-02-28 20:16:25 +000010#include "GrGLContext.h"
bsalomon@google.comc9668ec2012-04-11 18:16:41 +000011#include "SkTSearch.h"
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000012
13GrGLCaps::GrGLCaps() {
14 this->reset();
15}
16
17void GrGLCaps::reset() {
18 fVerifiedColorConfigs.reset();
19 fStencilFormats.reset();
20 fStencilVerifiedColorConfigs.reset();
21 fMSFBOType = kNone_MSFBOType;
bsalomon@google.comf6b070d2012-04-27 14:25:44 +000022 fMaxSampleCount = 0;
bsalomon@google.comc9668ec2012-04-11 18:16:41 +000023 fCoverageAAType = kNone_CoverageAAType;
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000024 fMaxFragmentUniformVectors = 0;
bsalomon@google.com60da4172012-06-01 19:25:00 +000025 fMaxVertexAttributes = 0;
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000026 fRGBA8RenderbufferSupport = false;
27 fBGRAFormatSupport = false;
28 fBGRAIsInternalFormat = false;
29 fTextureSwizzleSupport = false;
30 fUnpackRowLengthSupport = false;
31 fUnpackFlipYSupport = false;
32 fPackRowLengthSupport = false;
33 fPackFlipYSupport = false;
34 fTextureUsageSupport = false;
35 fTexStorageSupport = false;
robertphillips@google.com443e5a52012-04-30 20:01:21 +000036 fTextureRedSupport = false;
bsalomon@google.come76b7cc2012-06-18 12:47:06 +000037 fImagingSupport = false;
robertphillips@google.com1d89c932012-06-27 19:31:41 +000038 fTwoFormatLimit = false;
bsalomon@google.com706f6682012-10-23 14:53:55 +000039 fFragCoordsConventionSupport = false;
bsalomon@google.com96966a52013-02-21 16:34:21 +000040 fUseNonVBOVertexAndIndexDynamicData = false;
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000041}
42
43GrGLCaps::GrGLCaps(const GrGLCaps& caps) {
44 *this = caps;
45}
46
47GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) {
48 fVerifiedColorConfigs = caps.fVerifiedColorConfigs;
49 fStencilFormats = caps.fStencilFormats;
50 fStencilVerifiedColorConfigs = caps.fStencilVerifiedColorConfigs;
51 fMaxFragmentUniformVectors = caps.fMaxFragmentUniformVectors;
bsalomon@google.com60da4172012-06-01 19:25:00 +000052 fMaxVertexAttributes = caps.fMaxVertexAttributes;
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000053 fMSFBOType = caps.fMSFBOType;
bsalomon@google.comf6b070d2012-04-27 14:25:44 +000054 fMaxSampleCount = caps.fMaxSampleCount;
bsalomon@google.comc9668ec2012-04-11 18:16:41 +000055 fCoverageAAType = caps.fCoverageAAType;
56 fMSAACoverageModes = caps.fMSAACoverageModes;
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000057 fRGBA8RenderbufferSupport = caps.fRGBA8RenderbufferSupport;
58 fBGRAFormatSupport = caps.fBGRAFormatSupport;
59 fBGRAIsInternalFormat = caps.fBGRAIsInternalFormat;
60 fTextureSwizzleSupport = caps.fTextureSwizzleSupport;
61 fUnpackRowLengthSupport = caps.fUnpackRowLengthSupport;
62 fUnpackFlipYSupport = caps.fUnpackFlipYSupport;
63 fPackRowLengthSupport = caps.fPackRowLengthSupport;
64 fPackFlipYSupport = caps.fPackFlipYSupport;
65 fTextureUsageSupport = caps.fTextureUsageSupport;
66 fTexStorageSupport = caps.fTexStorageSupport;
robertphillips@google.com443e5a52012-04-30 20:01:21 +000067 fTextureRedSupport = caps.fTextureRedSupport;
bsalomon@google.come76b7cc2012-06-18 12:47:06 +000068 fImagingSupport = caps.fImagingSupport;
robertphillips@google.com1d89c932012-06-27 19:31:41 +000069 fTwoFormatLimit = caps.fTwoFormatLimit;
bsalomon@google.com706f6682012-10-23 14:53:55 +000070 fFragCoordsConventionSupport = caps.fFragCoordsConventionSupport;
bsalomon@google.com96966a52013-02-21 16:34:21 +000071 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicData;
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000072
73 return *this;
74}
75
robertphillips@google.com6177e692013-02-28 20:16:25 +000076void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000077
78 this->reset();
79 if (!ctxInfo.isInitialized()) {
80 return;
81 }
82
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000083 GrGLBinding binding = ctxInfo.binding();
84 GrGLVersion version = ctxInfo.version();
85
86 if (kES2_GrGLBinding == binding) {
87 GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS,
88 &fMaxFragmentUniformVectors);
89 } else {
90 GrAssert(kDesktop_GrGLBinding == binding);
91 GrGLint max;
92 GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max);
93 fMaxFragmentUniformVectors = max / 4;
94 }
bsalomon@google.com60da4172012-06-01 19:25:00 +000095 GR_GL_GetIntegerv(gli, GR_GL_MAX_VERTEX_ATTRIBS, &fMaxVertexAttributes);
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000096
97 if (kDesktop_GrGLBinding == binding) {
98 fRGBA8RenderbufferSupport = true;
99 } else {
100 fRGBA8RenderbufferSupport = ctxInfo.hasExtension("GL_OES_rgb8_rgba8") ||
101 ctxInfo.hasExtension("GL_ARM_rgba8");
102 }
103
104 if (kDesktop_GrGLBinding == binding) {
105 fBGRAFormatSupport = version >= GR_GL_VER(1,2) ||
106 ctxInfo.hasExtension("GL_EXT_bgra");
107 } else {
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000108 if (ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888")) {
109 fBGRAFormatSupport = true;
110 } else if (ctxInfo.hasExtension("GL_EXT_texture_format_BGRA8888")) {
111 fBGRAFormatSupport = true;
112 fBGRAIsInternalFormat = true;
113 }
114 GrAssert(fBGRAFormatSupport ||
bsalomon@google.com0342a852012-08-20 19:22:38 +0000115 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig);
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000116 }
117
118 if (kDesktop_GrGLBinding == binding) {
119 fTextureSwizzleSupport = version >= GR_GL_VER(3,3) ||
120 ctxInfo.hasExtension("GL_ARB_texture_swizzle");
121 } else {
122 fTextureSwizzleSupport = false;
123 }
124
125 if (kDesktop_GrGLBinding == binding) {
126 fUnpackRowLengthSupport = true;
127 fUnpackFlipYSupport = false;
128 fPackRowLengthSupport = true;
129 fPackFlipYSupport = false;
130 } else {
131 fUnpackRowLengthSupport =ctxInfo.hasExtension("GL_EXT_unpack_subimage");
132 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy");
133 // no extension for pack row length
134 fPackRowLengthSupport = false;
135 fPackFlipYSupport =
136 ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order");
137 }
138
139 fTextureUsageSupport = (kES2_GrGLBinding == binding) &&
140 ctxInfo.hasExtension("GL_ANGLE_texture_usage");
141
142 // Tex storage is in desktop 4.2 and can be an extension to desktop or ES.
143 fTexStorageSupport = (kDesktop_GrGLBinding == binding &&
144 version >= GR_GL_VER(4,2)) ||
145 ctxInfo.hasExtension("GL_ARB_texture_storage") ||
146 ctxInfo.hasExtension("GL_EXT_texture_storage");
147
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000148 // ARB_texture_rg is part of OpenGL 3.0
149 if (kDesktop_GrGLBinding == binding) {
150 fTextureRedSupport = version >= GR_GL_VER(3,0) ||
151 ctxInfo.hasExtension("GL_ARB_texture_rg");
152 } else {
153 fTextureRedSupport = ctxInfo.hasExtension("GL_EXT_texture_rg");
154 }
155
bsalomon@google.come76b7cc2012-06-18 12:47:06 +0000156 fImagingSupport = kDesktop_GrGLBinding == binding &&
157 ctxInfo.hasExtension("GL_ARB_imaging");
158
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000159 // ES 2 only guarantees RGBA/uchar + one other format/type combo for
160 // ReadPixels. The other format has to checked at run-time since it
161 // can change based on which render target is bound
162 fTwoFormatLimit = kES2_GrGLBinding == binding;
163
bsalomon@google.com706f6682012-10-23 14:53:55 +0000164 // Known issue on at least some Intel platforms:
165 // http://code.google.com/p/skia/issues/detail?id=946
166 if (kIntel_GrGLVendor != ctxInfo.vendor()) {
167 fFragCoordsConventionSupport = ctxInfo.glslGeneration() >= k150_GrGLSLGeneration ||
168 ctxInfo.hasExtension("GL_ARB_fragment_coord_conventions");
169 }
170
bsalomon@google.com3012ded2013-02-22 16:44:04 +0000171 // SGX and Mali GPUs that are based on a tiled-deferred architecture that have trouble with
172 // frequently changing VBOs. We've measured a performance increase using non-VBO vertex
173 // data for dynamic content on these GPUs. Perhaps we should read the renderer string and
174 // limit this decision to specific GPU families rather than basing it on the vendor alone.
175 if (!GR_GL_MUST_USE_VBO &&
176 (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxInfo.vendor())) {
bsalomon@google.com96966a52013-02-21 16:34:21 +0000177 fUseNonVBOVertexAndIndexDynamicData = true;
178 }
179
robertphillips@google.com6177e692013-02-28 20:16:25 +0000180 this->initFSAASupport(ctxInfo, gli);
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000181 this->initStencilFormats(ctxInfo);
182}
183
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000184bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf,
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000185 GrGLenum format,
186 GrGLenum type) const {
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000187 if (GR_GL_RGBA == format && GR_GL_UNSIGNED_BYTE == type) {
188 // ES 2 guarantees this format is supported
robertphillips@google.comeca2dfb2012-06-27 20:13:49 +0000189 return true;
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000190 }
191
192 if (!fTwoFormatLimit) {
193 // not limited by ES 2's constraints
194 return true;
195 }
196
bsalomon@google.com548a4332012-07-11 19:45:22 +0000197 GrGLint otherFormat = GR_GL_RGBA;
198 GrGLint otherType = GR_GL_UNSIGNED_BYTE;
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000199
200 // The other supported format/type combo supported for ReadPixels
201 // can change based on which render target is bound
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000202 GR_GL_GetIntegerv(intf,
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000203 GR_GL_IMPLEMENTATION_COLOR_READ_FORMAT,
204 &otherFormat);
205
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000206 GR_GL_GetIntegerv(intf,
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000207 GR_GL_IMPLEMENTATION_COLOR_READ_TYPE,
208 &otherType);
209
bsalomon@google.com548a4332012-07-11 19:45:22 +0000210 return (GrGLenum)otherFormat == format && (GrGLenum)otherType == type;
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000211}
212
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000213namespace {
214int coverage_mode_compare(const GrGLCaps::MSAACoverageMode* left,
215 const GrGLCaps::MSAACoverageMode* right) {
216 if (left->fCoverageSampleCnt < right->fCoverageSampleCnt) {
217 return -1;
218 } else if (right->fCoverageSampleCnt < left->fCoverageSampleCnt) {
219 return 1;
220 } else if (left->fColorSampleCnt < right->fColorSampleCnt) {
221 return -1;
222 } else if (right->fColorSampleCnt < left->fColorSampleCnt) {
223 return 1;
224 }
225 return 0;
226}
227}
228
robertphillips@google.com6177e692013-02-28 20:16:25 +0000229void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000230
231 fMSFBOType = kNone_MSFBOType;
232 if (kDesktop_GrGLBinding != ctxInfo.binding()) {
233 if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
234 // chrome's extension is equivalent to the EXT msaa
235 // and fbo_blit extensions.
236 fMSFBOType = kDesktopEXT_MSFBOType;
237 } else if (ctxInfo.hasExtension("GL_APPLE_framebuffer_multisample")) {
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000238 fMSFBOType = kAppleES_MSFBOType;
239 }
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000240 } else {
241 if ((ctxInfo.version() >= GR_GL_VER(3,0)) ||
242 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
243 fMSFBOType = GrGLCaps::kDesktopARB_MSFBOType;
244 } else if (ctxInfo.hasExtension("GL_EXT_framebuffer_multisample") &&
245 ctxInfo.hasExtension("GL_EXT_framebuffer_blit")) {
246 fMSFBOType = GrGLCaps::kDesktopEXT_MSFBOType;
247 }
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000248 // TODO: We could populate fMSAACoverageModes using GetInternalformativ
249 // on GL 4.2+. It's format-specific, though. See also
250 // http://code.google.com/p/skia/issues/detail?id=470 about using actual
251 // rather than requested sample counts in cache key.
252 if (ctxInfo.hasExtension("GL_NV_framebuffer_multisample_coverage")) {
253 fCoverageAAType = kNVDesktop_CoverageAAType;
254 GrGLint count;
robertphillips@google.com6177e692013-02-28 20:16:25 +0000255 GR_GL_GetIntegerv(gli,
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000256 GR_GL_MAX_MULTISAMPLE_COVERAGE_MODES,
257 &count);
258 fMSAACoverageModes.setCount(count);
robertphillips@google.com6177e692013-02-28 20:16:25 +0000259 GR_GL_GetIntegerv(gli,
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000260 GR_GL_MULTISAMPLE_COVERAGE_MODES,
261 (int*)&fMSAACoverageModes[0]);
262 // The NV driver seems to return the modes already sorted but the
263 // spec doesn't require this. So we sort.
reed@google.comc7a67cb2012-05-07 14:52:12 +0000264 qsort(&fMSAACoverageModes[0],
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000265 count,
266 sizeof(MSAACoverageMode),
reed@google.comc7a67cb2012-05-07 14:52:12 +0000267 SkCastForQSort(coverage_mode_compare));
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000268 }
269 }
bsalomon@google.comf6b070d2012-04-27 14:25:44 +0000270 if (kNone_MSFBOType != fMSFBOType) {
robertphillips@google.com6177e692013-02-28 20:16:25 +0000271 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxSampleCount);
bsalomon@google.comf6b070d2012-04-27 14:25:44 +0000272 }
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000273}
274
275const GrGLCaps::MSAACoverageMode& GrGLCaps::getMSAACoverageMode(
276 int desiredSampleCount) const {
277 static const MSAACoverageMode kNoneMode = {0, 0};
278 if (0 == fMSAACoverageModes.count()) {
279 return kNoneMode;
280 } else {
281 GrAssert(kNone_CoverageAAType != fCoverageAAType);
282 int max = (fMSAACoverageModes.end() - 1)->fCoverageSampleCnt;
283 desiredSampleCount = GrMin(desiredSampleCount, max);
284 MSAACoverageMode desiredMode = {desiredSampleCount, 0};
285 int idx = SkTSearch<MSAACoverageMode>(&fMSAACoverageModes[0],
286 fMSAACoverageModes.count(),
287 desiredMode,
288 sizeof(MSAACoverageMode),
289 &coverage_mode_compare);
290 if (idx < 0) {
291 idx = ~idx;
292 }
293 GrAssert(idx >= 0 && idx < fMSAACoverageModes.count());
294 return fMSAACoverageModes[idx];
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000295 }
296}
297
298namespace {
299const GrGLuint kUnknownBitCount = GrGLStencilBuffer::kUnknownBitCount;
300}
301
302void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) {
303
304 // Build up list of legal stencil formats (though perhaps not supported on
305 // the particular gpu/driver) from most preferred to least.
306
307 // these consts are in order of most preferred to least preferred
308 // we don't bother with GL_STENCIL_INDEX1 or GL_DEPTH32F_STENCIL8
309
310 static const StencilFormat
311 // internal Format stencil bits total bits packed?
312 gS8 = {GR_GL_STENCIL_INDEX8, 8, 8, false},
313 gS16 = {GR_GL_STENCIL_INDEX16, 16, 16, false},
314 gD24S8 = {GR_GL_DEPTH24_STENCIL8, 8, 32, true },
315 gS4 = {GR_GL_STENCIL_INDEX4, 4, 4, false},
caryclark@google.comcf6285b2012-06-06 12:09:01 +0000316 // gS = {GR_GL_STENCIL_INDEX, kUnknownBitCount, kUnknownBitCount, false},
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000317 gDS = {GR_GL_DEPTH_STENCIL, kUnknownBitCount, kUnknownBitCount, true };
318
319 if (kDesktop_GrGLBinding == ctxInfo.binding()) {
320 bool supportsPackedDS =
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000321 ctxInfo.version() >= GR_GL_VER(3,0) ||
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000322 ctxInfo.hasExtension("GL_EXT_packed_depth_stencil") ||
323 ctxInfo.hasExtension("GL_ARB_framebuffer_object");
324
325 // S1 thru S16 formats are in GL 3.0+, EXT_FBO, and ARB_FBO since we
326 // require FBO support we can expect these are legal formats and don't
327 // check. These also all support the unsized GL_STENCIL_INDEX.
328 fStencilFormats.push_back() = gS8;
329 fStencilFormats.push_back() = gS16;
330 if (supportsPackedDS) {
331 fStencilFormats.push_back() = gD24S8;
332 }
333 fStencilFormats.push_back() = gS4;
334 if (supportsPackedDS) {
335 fStencilFormats.push_back() = gDS;
336 }
337 } else {
338 // ES2 has STENCIL_INDEX8 without extensions but requires extensions
339 // for other formats.
340 // ES doesn't support using the unsized format.
341
342 fStencilFormats.push_back() = gS8;
343 //fStencilFormats.push_back() = gS16;
344 if (ctxInfo.hasExtension("GL_OES_packed_depth_stencil")) {
345 fStencilFormats.push_back() = gD24S8;
346 }
347 if (ctxInfo.hasExtension("GL_OES_stencil4")) {
348 fStencilFormats.push_back() = gS4;
349 }
350 }
351 GrAssert(0 == fStencilVerifiedColorConfigs.count());
352 fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count());
353}
354
355void GrGLCaps::markColorConfigAndStencilFormatAsVerified(
356 GrPixelConfig config,
357 const GrGLStencilBuffer::Format& format) {
358#if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
359 return;
360#endif
361 GrAssert((unsigned)config < kGrPixelConfigCount);
362 GrAssert(fStencilFormats.count() == fStencilVerifiedColorConfigs.count());
363 int count = fStencilFormats.count();
364 // we expect a really small number of possible formats so linear search
365 // should be OK
366 GrAssert(count < 16);
367 for (int i = 0; i < count; ++i) {
368 if (format.fInternalFormat ==
369 fStencilFormats[i].fInternalFormat) {
370 fStencilVerifiedColorConfigs[i].markVerified(config);
371 return;
372 }
373 }
374 GrCrash("Why are we seeing a stencil format that "
375 "GrGLCaps doesn't know about.");
376}
377
378bool GrGLCaps::isColorConfigAndStencilFormatVerified(
379 GrPixelConfig config,
380 const GrGLStencilBuffer::Format& format) const {
381#if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
382 return false;
383#endif
384 GrAssert((unsigned)config < kGrPixelConfigCount);
385 int count = fStencilFormats.count();
386 // we expect a really small number of possible formats so linear search
387 // should be OK
388 GrAssert(count < 16);
389 for (int i = 0; i < count; ++i) {
390 if (format.fInternalFormat ==
391 fStencilFormats[i].fInternalFormat) {
392 return fStencilVerifiedColorConfigs[i].isVerified(config);
393 }
394 }
395 GrCrash("Why are we seeing a stencil format that "
396 "GLCaps doesn't know about.");
397 return false;
398}
399
400void GrGLCaps::print() const {
401 for (int i = 0; i < fStencilFormats.count(); ++i) {
402 GrPrintf("Stencil Format %d, stencil bits: %02d, total bits: %02d\n",
403 i,
404 fStencilFormats[i].fStencilBits,
405 fStencilFormats[i].fTotalBits);
406 }
407
408 GR_STATIC_ASSERT(0 == kNone_MSFBOType);
409 GR_STATIC_ASSERT(1 == kDesktopARB_MSFBOType);
410 GR_STATIC_ASSERT(2 == kDesktopEXT_MSFBOType);
411 GR_STATIC_ASSERT(3 == kAppleES_MSFBOType);
412 static const char* gMSFBOExtStr[] = {
413 "None",
414 "ARB",
415 "EXT",
416 "Apple",
417 };
418 GrPrintf("MSAA Type: %s\n", gMSFBOExtStr[fMSFBOType]);
419 GrPrintf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors);
420 GrPrintf("Support RGBA8 Render Buffer: %s\n",
421 (fRGBA8RenderbufferSupport ? "YES": "NO"));
422 GrPrintf("BGRA is an internal format: %s\n",
423 (fBGRAIsInternalFormat ? "YES": "NO"));
424 GrPrintf("Support texture swizzle: %s\n",
425 (fTextureSwizzleSupport ? "YES": "NO"));
426 GrPrintf("Unpack Row length support: %s\n",
427 (fUnpackRowLengthSupport ? "YES": "NO"));
428 GrPrintf("Unpack Flip Y support: %s\n",
429 (fUnpackFlipYSupport ? "YES": "NO"));
430 GrPrintf("Pack Row length support: %s\n",
431 (fPackRowLengthSupport ? "YES": "NO"));
432 GrPrintf("Pack Flip Y support: %s\n",
433 (fPackFlipYSupport ? "YES": "NO"));
robertphillips@google.com1d89c932012-06-27 19:31:41 +0000434 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
bsalomon@google.com706f6682012-10-23 14:53:55 +0000435 GrPrintf("Fragment coord conventions support: %s\n", (fFragCoordsConventionSupport ? "YES": "NO"));
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000436}