OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "GrGLCaps.h" | 9 #include "GrGLCaps.h" |
10 | 10 |
11 #include "GrContextOptions.h" | 11 #include "GrContextOptions.h" |
12 #include "GrGLContext.h" | 12 #include "GrGLContext.h" |
13 #include "GrGLRenderTarget.h" | 13 #include "GrGLRenderTarget.h" |
14 #include "glsl/GrGLSLCaps.h" | 14 #include "glsl/GrGLSLCaps.h" |
15 #include "SkTSearch.h" | 15 #include "SkTSearch.h" |
16 #include "SkTSort.h" | 16 #include "SkTSort.h" |
17 | 17 |
18 GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, | 18 GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, |
19 const GrGLContextInfo& ctxInfo, | 19 const GrGLContextInfo& ctxInfo, |
20 const GrGLInterface* glInterface) : INHERITED(contextOptions)
{ | 20 const GrGLInterface* glInterface) : INHERITED(contextOptions)
{ |
21 fStandard = ctxInfo.standard(); | 21 fStandard = ctxInfo.standard(); |
22 | 22 |
23 fStencilFormats.reset(); | 23 fStencilFormats.reset(); |
24 fMSFBOType = kNone_MSFBOType; | 24 fMSFBOType = kNone_MSFBOType; |
25 fInvalidateFBType = kNone_InvalidateFBType; | 25 fInvalidateFBType = kNone_InvalidateFBType; |
26 fMapBufferType = kNone_MapBufferType; | 26 fMapBufferType = kNone_MapBufferType; |
27 fTransferBufferType = kNone_TransferBufferType; | 27 fTransferBufferType = kNone_TransferBufferType; |
28 fMaxFragmentUniformVectors = 0; | 28 fMaxFragmentUniformVectors = 0; |
29 fMaxVertexAttributes = 0; | 29 fMaxVertexAttributes = 0; |
30 fMaxFragmentTextureUnits = 0; | |
31 fUnpackRowLengthSupport = false; | 30 fUnpackRowLengthSupport = false; |
32 fUnpackFlipYSupport = false; | 31 fUnpackFlipYSupport = false; |
33 fPackRowLengthSupport = false; | 32 fPackRowLengthSupport = false; |
34 fPackFlipYSupport = false; | 33 fPackFlipYSupport = false; |
35 fTextureUsageSupport = false; | 34 fTextureUsageSupport = false; |
36 fTextureRedSupport = false; | 35 fTextureRedSupport = false; |
37 fImagingSupport = false; | 36 fImagingSupport = false; |
38 fVertexArrayObjectSupport = false; | 37 fVertexArrayObjectSupport = false; |
39 fDirectStateAccessSupport = false; | 38 fDirectStateAccessSupport = false; |
40 fDebugSupport = false; | 39 fDebugSupport = false; |
41 fES2CompatibilitySupport = false; | 40 fES2CompatibilitySupport = false; |
42 fMultisampleDisableSupport = false; | 41 fMultisampleDisableSupport = false; |
43 fDrawIndirectSupport = false; | 42 fDrawIndirectSupport = false; |
44 fMultiDrawIndirectSupport = false; | 43 fMultiDrawIndirectSupport = false; |
45 fBaseInstanceSupport = false; | 44 fBaseInstanceSupport = false; |
46 fUseNonVBOVertexAndIndexDynamicData = false; | 45 fUseNonVBOVertexAndIndexDynamicData = false; |
47 fIsCoreProfile = false; | 46 fIsCoreProfile = false; |
48 fBindFragDataLocationSupport = false; | 47 fBindFragDataLocationSupport = false; |
49 fExternalTextureSupport = false; | |
50 fRectangleTextureSupport = false; | 48 fRectangleTextureSupport = false; |
51 fTextureSwizzleSupport = false; | 49 fTextureSwizzleSupport = false; |
52 fSRGBWriteControl = false; | 50 fSRGBWriteControl = false; |
53 fRGBA8888PixelsOpsAreSlow = false; | 51 fRGBA8888PixelsOpsAreSlow = false; |
54 fPartialFBOReadIsSlow = false; | 52 fPartialFBOReadIsSlow = false; |
55 fMipMapLevelAndLodControlSupport = false; | 53 fMipMapLevelAndLodControlSupport = false; |
56 | 54 |
57 fBlitFramebufferSupport = kNone_BlitFramebufferSupport; | 55 fBlitFramebufferSupport = kNone_BlitFramebufferSupport; |
58 | 56 |
59 fShaderCaps.reset(new GrGLSLCaps(contextOptions)); | 57 fShaderCaps.reset(new GrGLSLCaps(contextOptions)); |
(...skipping 19 matching lines...) Expand all Loading... |
79 GrGLint max; | 77 GrGLint max; |
80 GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max); | 78 GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max); |
81 fMaxFragmentUniformVectors = max / 4; | 79 fMaxFragmentUniformVectors = max / 4; |
82 if (version >= GR_GL_VER(3, 2)) { | 80 if (version >= GR_GL_VER(3, 2)) { |
83 GrGLint profileMask; | 81 GrGLint profileMask; |
84 GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask); | 82 GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask); |
85 fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_B
IT); | 83 fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_B
IT); |
86 } | 84 } |
87 } | 85 } |
88 GR_GL_GetIntegerv(gli, GR_GL_MAX_VERTEX_ATTRIBS, &fMaxVertexAttributes); | 86 GR_GL_GetIntegerv(gli, GR_GL_MAX_VERTEX_ATTRIBS, &fMaxVertexAttributes); |
89 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &fMaxFragmentTextureUn
its); | |
90 | 87 |
91 if (kGL_GrGLStandard == standard) { | 88 if (kGL_GrGLStandard == standard) { |
92 fUnpackRowLengthSupport = true; | 89 fUnpackRowLengthSupport = true; |
93 fUnpackFlipYSupport = false; | 90 fUnpackFlipYSupport = false; |
94 fPackRowLengthSupport = true; | 91 fPackRowLengthSupport = true; |
95 fPackFlipYSupport = false; | 92 fPackFlipYSupport = false; |
96 } else { | 93 } else { |
97 fUnpackRowLengthSupport = version >= GR_GL_VER(3,0) || | 94 fUnpackRowLengthSupport = version >= GR_GL_VER(3,0) || |
98 ctxInfo.hasExtension("GL_EXT_unpack_subimage")
; | 95 ctxInfo.hasExtension("GL_EXT_unpack_subimage")
; |
99 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy"); | 96 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy"); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 fBindFragDataLocationSupport = true; | 203 fBindFragDataLocationSupport = true; |
207 } | 204 } |
208 } | 205 } |
209 | 206 |
210 #if 0 // Disabled due to https://bug.skia.org/4454 | 207 #if 0 // Disabled due to https://bug.skia.org/4454 |
211 fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform
_location"); | 208 fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform
_location"); |
212 #else | 209 #else |
213 fBindUniformLocationSupport = false; | 210 fBindUniformLocationSupport = false; |
214 #endif | 211 #endif |
215 | 212 |
216 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) { | |
217 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { | |
218 fExternalTextureSupport = true; | |
219 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") || | |
220 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) { | |
221 // At least one driver has been found that has this extension withou
t the "GL_" prefix. | |
222 fExternalTextureSupport = true; | |
223 } | |
224 } | |
225 | |
226 if (kGL_GrGLStandard == standard) { | 213 if (kGL_GrGLStandard == standard) { |
227 if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_r
ectangle")) { | 214 if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_r
ectangle")) { |
228 // We also require textureSize() support for rectangle 2D samplers w
hich was added in | 215 // We also require textureSize() support for rectangle 2D samplers w
hich was added in |
229 // GLSL 1.40. | 216 // GLSL 1.40. |
230 if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) { | 217 if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) { |
231 fRectangleTextureSupport = true; | 218 fRectangleTextureSupport = true; |
232 } | 219 } |
233 } | 220 } |
234 } else { | 221 } else { |
235 // Command buffer exposes this in GL ES context for Chromium reasons, | 222 // Command buffer exposes this in GL ES context for Chromium reasons, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 | 293 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 |
307 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT, | 294 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT, |
308 &glslCaps->fPixelLocalStorageSize); | 295 &glslCaps->fPixelLocalStorageSize); |
309 glslCaps->fPLSPathRenderingSupport = glslCaps->fFBFetchSupport; | 296 glslCaps->fPLSPathRenderingSupport = glslCaps->fFBFetchSupport; |
310 } | 297 } |
311 else { | 298 else { |
312 glslCaps->fPixelLocalStorageSize = 0; | 299 glslCaps->fPixelLocalStorageSize = 0; |
313 glslCaps->fPLSPathRenderingSupport = false; | 300 glslCaps->fPLSPathRenderingSupport = false; |
314 } | 301 } |
315 | 302 |
| 303 // Protect ourselves against tracking huge amounts of texture state. |
| 304 static const uint8_t kMaxSaneSamplers = 32; |
| 305 GrGLint maxSamplers; |
| 306 GR_GL_GetIntegerv(gli, GR_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &maxSamplers); |
| 307 glslCaps->fMaxVertexSamplers = SkTMin<GrGLint>(kMaxSaneSamplers, maxSamplers
); |
| 308 if (glslCaps->fGeometryShaderSupport) { |
| 309 GR_GL_GetIntegerv(gli, GR_GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, &maxSampl
ers); |
| 310 glslCaps->fMaxGeometrySamplers = SkTMin<GrGLint>(kMaxSaneSamplers, maxSa
mplers); |
| 311 } |
| 312 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &maxSamplers); |
| 313 glslCaps->fMaxFragmentSamplers = SkTMin<GrGLint>(kMaxSaneSamplers, maxSample
rs); |
| 314 GR_GL_GetIntegerv(gli, GR_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxSamplers)
; |
| 315 glslCaps->fMaxCombinedSamplers = SkTMin<GrGLint>(kMaxSaneSamplers, maxSample
rs); |
| 316 |
316 /************************************************************************** | 317 /************************************************************************** |
317 * GrCaps fields | 318 * GrCaps fields |
318 **************************************************************************/ | 319 **************************************************************************/ |
319 | 320 |
320 // We need dual source blending and the ability to disable multisample in or
der to support mixed | 321 // We need dual source blending and the ability to disable multisample in or
der to support mixed |
321 // samples in every corner case. | 322 // samples in every corner case. |
322 if (fMultisampleDisableSupport && | 323 if (fMultisampleDisableSupport && |
323 glslCaps->dualSourceBlendingSupport() && | 324 glslCaps->dualSourceBlendingSupport() && |
324 fShaderCaps->pathRenderingSupport()) { | 325 fShaderCaps->pathRenderingSupport()) { |
325 fUsesMixedSamples = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sample
s") || | 326 fUsesMixedSamples = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sample
s") || |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 kGLES_GrGLStandard != standard && | 692 kGLES_GrGLStandard != standard && |
692 (ctxInfo.glslGeneration() >= k150_GrGLSLGeneration || | 693 (ctxInfo.glslGeneration() >= k150_GrGLSLGeneration || |
693 ctxInfo.hasExtension("GL_ARB_fragment_coord_conventions"))) { | 694 ctxInfo.hasExtension("GL_ARB_fragment_coord_conventions"))) { |
694 glslCaps->fFragCoordConventionsExtensionString = "GL_ARB_fragment_coord_
conventions"; | 695 glslCaps->fFragCoordConventionsExtensionString = "GL_ARB_fragment_coord_
conventions"; |
695 } | 696 } |
696 | 697 |
697 if (kGLES_GrGLStandard == standard) { | 698 if (kGLES_GrGLStandard == standard) { |
698 glslCaps->fSecondaryOutputExtensionString = "GL_EXT_blend_func_extended"
; | 699 glslCaps->fSecondaryOutputExtensionString = "GL_EXT_blend_func_extended"
; |
699 } | 700 } |
700 | 701 |
701 if (fExternalTextureSupport) { | 702 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) { |
| 703 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { |
| 704 glslCaps->fExternalTextureSupport = true; |
| 705 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") || |
| 706 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) { |
| 707 // At least one driver has been found that has this extension withou
t the "GL_" prefix. |
| 708 glslCaps->fExternalTextureSupport = true; |
| 709 } |
| 710 } |
| 711 |
| 712 if (glslCaps->fExternalTextureSupport) { |
702 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { | 713 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { |
703 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern
al"; | 714 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern
al"; |
704 } else { | 715 } else { |
705 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern
al_essl3"; | 716 glslCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_extern
al_essl3"; |
706 } | 717 } |
707 } | 718 } |
708 | 719 |
709 // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1.
0), so we must do | 720 // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1.
0), so we must do |
710 // the abs first in a separate expression. | 721 // the abs first in a separate expression. |
711 if (kTegra3_GrGLRenderer == ctxInfo.renderer()) { | 722 if (kTegra3_GrGLRenderer == ctxInfo.renderer()) { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 GR_STATIC_ASSERT(1 == kMapBuffer_MapBufferType); | 1030 GR_STATIC_ASSERT(1 == kMapBuffer_MapBufferType); |
1020 GR_STATIC_ASSERT(2 == kMapBufferRange_MapBufferType); | 1031 GR_STATIC_ASSERT(2 == kMapBufferRange_MapBufferType); |
1021 GR_STATIC_ASSERT(3 == kChromium_MapBufferType); | 1032 GR_STATIC_ASSERT(3 == kChromium_MapBufferType); |
1022 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMapBufferTypeStr) == kLast_MapBufferType +
1); | 1033 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMapBufferTypeStr) == kLast_MapBufferType +
1); |
1023 | 1034 |
1024 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); | 1035 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); |
1025 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); | 1036 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); |
1026 r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType
]); | 1037 r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType
]); |
1027 r.appendf("Map Buffer Type: %s\n", kMapBufferTypeStr[fMapBufferType]); | 1038 r.appendf("Map Buffer Type: %s\n", kMapBufferTypeStr[fMapBufferType]); |
1028 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); | 1039 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); |
1029 r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits); | |
1030 r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); | 1040 r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); |
1031 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES
": "NO")); | 1041 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES
": "NO")); |
1032 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")
); | 1042 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")
); |
1033 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "
NO")); | 1043 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "
NO")); |
1034 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); | 1044 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); |
1035 | 1045 |
1036 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO"
)); | 1046 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO"
)); |
1037 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); | 1047 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); |
1038 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 1048 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
1039 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1049 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
1040 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); | 1050 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); |
1041 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); | 1051 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); |
1042 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); | 1052 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); |
1043 r.appendf("Draw indirect support: %s\n", (fDrawIndirectSupport ? "YES" : "NO
")); | 1053 r.appendf("Draw indirect support: %s\n", (fDrawIndirectSupport ? "YES" : "NO
")); |
1044 r.appendf("Multi draw indirect support: %s\n", (fMultiDrawIndirectSupport ?
"YES" : "NO")); | 1054 r.appendf("Multi draw indirect support: %s\n", (fMultiDrawIndirectSupport ?
"YES" : "NO")); |
1045 r.appendf("Base instance support: %s\n", (fBaseInstanceSupport ? "YES" : "NO
")); | 1055 r.appendf("Base instance support: %s\n", (fBaseInstanceSupport ? "YES" : "NO
")); |
1046 r.appendf("Use non-VBO for dynamic data: %s\n", | 1056 r.appendf("Use non-VBO for dynamic data: %s\n", |
1047 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 1057 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
1048 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); | 1058 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); |
1049 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ?
"YES" : "NO")); | 1059 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ?
"YES" : "NO")); |
1050 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" :
"NO")); | 1060 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" :
"NO")); |
1051 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor
t ? "YES" : "NO")); | 1061 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor
t ? "YES" : "NO")); |
1052 r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES"
: "NO")); | |
1053 r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES
" : "NO")); | 1062 r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES
" : "NO")); |
1054 r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" :
"NO")); | 1063 r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" :
"NO")); |
1055 | 1064 |
1056 r.append("Configs\n-------\n"); | 1065 r.append("Configs\n-------\n"); |
1057 for (int i = 0; i < kGrPixelConfigCnt; ++i) { | 1066 for (int i = 0; i < kGrPixelConfigCnt; ++i) { |
1058 r.appendf(" cfg: %d flags: 0x%04x, b_internal: 0x%08x s_internal: 0x%08
x, e_format: " | 1067 r.appendf(" cfg: %d flags: 0x%04x, b_internal: 0x%08x s_internal: 0x%08
x, e_format: " |
1059 "0x%08x, e_format_teximage: 0x%08x, e_type: 0x%08x, i_for_texi
mage: 0x%08x, " | 1068 "0x%08x, e_format_teximage: 0x%08x, e_type: 0x%08x, i_for_texi
mage: 0x%08x, " |
1060 "i_for_renderbuffer: 0x%08x\n", | 1069 "i_for_renderbuffer: 0x%08x\n", |
1061 i, | 1070 i, |
1062 fConfigTable[i].fFlags, | 1071 fConfigTable[i].fFlags, |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1811 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1803 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1812 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1804 fConfigTable[i].fFormats.fExternalFormat[j]); | 1813 fConfigTable[i].fFormats.fExternalFormat[j]); |
1805 } | 1814 } |
1806 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1815 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1807 } | 1816 } |
1808 #endif | 1817 #endif |
1809 } | 1818 } |
1810 | 1819 |
1811 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1820 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |