| 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 #include "GrGLContext.h" | 10 #include "GrGLContext.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 // (PathTexGen, texcoords, ...) or using the newer NVPR API additio
ns that support | 335 // (PathTexGen, texcoords, ...) or using the newer NVPR API additio
ns that support |
| 336 // setting individual fragment inputs with ProgramPathFragmentInputG
en. The API | 336 // setting individual fragment inputs with ProgramPathFragmentInputG
en. The API |
| 337 // additions are detected by checking the existence of the function.
Eventually we may | 337 // additions are detected by checking the existence of the function.
Eventually we may |
| 338 // choose to remove the fixed function codepath. | 338 // choose to remove the fixed function codepath. |
| 339 // Set fMaxFixedFunctionTextureCoords = 0 here if you want to force | 339 // Set fMaxFixedFunctionTextureCoords = 0 here if you want to force |
| 340 // ProgramPathFragmentInputGen usage on desktop. | 340 // ProgramPathFragmentInputGen usage on desktop. |
| 341 fPathRenderingSupport = ctxInfo.hasExtension("GL_EXT_direct_state_ac
cess") && | 341 fPathRenderingSupport = ctxInfo.hasExtension("GL_EXT_direct_state_ac
cess") && |
| 342 (fMaxFixedFunctionTextureCoords > 0 || | 342 (fMaxFixedFunctionTextureCoords > 0 || |
| 343 ((ctxInfo.version() >= GR_GL_VER(4,3) || | 343 ((ctxInfo.version() >= GR_GL_VER(4,3) || |
| 344 ctxInfo.hasExtension("GL_ARB_program_interface_query")) && | 344 ctxInfo.hasExtension("GL_ARB_program_interface_query")) && |
| 345 NULL != gli->fFunctions.fProgramPathFragmentInputGen)); | 345 gli->fFunctions.fProgramPathFragmentInputGen)); |
| 346 } else { | 346 } else { |
| 347 fPathRenderingSupport = ctxInfo.version() >= GR_GL_VER(3,1); | 347 fPathRenderingSupport = ctxInfo.version() >= GR_GL_VER(3,1); |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 | 350 |
| 351 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); | 351 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); |
| 352 | 352 |
| 353 // For now these two are equivalent but we could have dst read in shader via
some other method | 353 // For now these two are equivalent but we could have dst read in shader via
some other method |
| 354 fDstReadInShaderSupport = fFBFetchSupport; | 354 fDstReadInShaderSupport = fFBFetchSupport; |
| 355 | 355 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig); | 512 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig); |
| 513 } | 513 } |
| 514 | 514 |
| 515 // Compressed texture support | 515 // Compressed texture support |
| 516 | 516 |
| 517 // glCompressedTexImage2D is available on all OpenGL ES devices... | 517 // glCompressedTexImage2D is available on all OpenGL ES devices... |
| 518 // however, it is only available on standard OpenGL after version 1.3 | 518 // however, it is only available on standard OpenGL after version 1.3 |
| 519 bool hasCompressTex2D = (kGL_GrGLStandard != standard || version >= GR_GL_VE
R(1, 3)); | 519 bool hasCompressTex2D = (kGL_GrGLStandard != standard || version >= GR_GL_VE
R(1, 3)); |
| 520 | 520 |
| 521 fCompressedTexSubImageSupport = | 521 fCompressedTexSubImageSupport = |
| 522 hasCompressTex2D && (NULL != gli->fFunctions.fCompressedTexSubImage2D); | 522 hasCompressTex2D && (gli->fFunctions.fCompressedTexSubImage2D); |
| 523 | 523 |
| 524 // Check for ETC1 | 524 // Check for ETC1 |
| 525 bool hasETC1 = false; | 525 bool hasETC1 = false; |
| 526 | 526 |
| 527 // First check version for support | 527 // First check version for support |
| 528 if (kGL_GrGLStandard == standard) { | 528 if (kGL_GrGLStandard == standard) { |
| 529 hasETC1 = hasCompressTex2D && | 529 hasETC1 = hasCompressTex2D && |
| 530 (version >= GR_GL_VER(4, 3) || | 530 (version >= GR_GL_VER(4, 3) || |
| 531 ctxInfo.hasExtension("GL_ARB_ES3_compatibility")); | 531 ctxInfo.hasExtension("GL_ARB_ES3_compatibility")); |
| 532 } else { | 532 } else { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 841 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
| 842 r.appendf("Fragment coord conventions support: %s\n", | 842 r.appendf("Fragment coord conventions support: %s\n", |
| 843 (fFragCoordsConventionSupport ? "YES": "NO")); | 843 (fFragCoordsConventionSupport ? "YES": "NO")); |
| 844 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 844 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
| 845 r.appendf("Use non-VBO for dynamic data: %s\n", | 845 r.appendf("Use non-VBO for dynamic data: %s\n", |
| 846 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 846 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
| 847 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 847 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
| 848 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 848 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
| 849 return r; | 849 return r; |
| 850 } | 850 } |
| OLD | NEW |