Lines Matching refs:ctxInfo

31                    const GrGLContextInfo& ctxInfo,
33 fStandard = ctxInfo.standard();
84 if (ctxInfo.angleBackend() == GrGLANGLEBackend::kOpenGL) {
85 this->init(contextOptions, ctxInfo.makeNonAngle(), glInterface);
89 this->init(contextOptions, ctxInfo, glInterface);
94 const GrGLContextInfo& ctxInfo,
96 GrGLStandard standard = ctxInfo.standard();
99 GrGLVersion version = ctxInfo.version();
126 version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_unpack_subimage");
128 version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_NV_pack_subimage");
130 ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order");
148 ctxInfo.hasExtension("GL_ANGLE_texture_usage");
152 ctxInfo.hasExtension("GL_ARB_texture_barrier") ||
153 ctxInfo.hasExtension("GL_NV_texture_barrier");
155 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier");
162 ctxInfo.hasExtension("GL_ARB_texture_multisample");
170 ctxInfo.hasExtension("GL_ARB_imaging");
174 ctxInfo.hasExtension("GL_ARB_invalidate_subdata"))) {
176 } else if (ctxInfo.hasExtension("GL_EXT_discard_framebuffer")) {
185 if (ctxInfo.vendor() == GrGLVendor::kARM) {
190 if (ctxInfo.vendor() == GrGLVendor::kARM ||
191 ctxInfo.vendor() == GrGLVendor::kImagination ||
192 ctxInfo.vendor() == GrGLVendor::kQualcomm ) {
198 ctxInfo.hasExtension("GL_ARB_vertex_array_object") ||
199 ctxInfo.hasExtension("GL_APPLE_vertex_array_object");
202 ctxInfo.hasExtension("GL_OES_vertex_array_object");
205 ctxInfo.hasExtension("GL_OES_vertex_array_object") ||
206 ctxInfo.hasExtension("OES_vertex_array_object");
212 fDebugSupport = ctxInfo.hasExtension("GL_KHR_debug");
218 fES2CompatibilitySupport = ctxInfo.hasExtension("GL_ARB_ES2_compatibility");
229 fClientCanDisableMultisample = ctxInfo.hasExtension("GL_EXT_multisample_compatibility");
239 (ctxInfo.hasExtension("GL_ARB_draw_instanced") &&
240 ctxInfo.hasExtension("GL_ARB_instanced_arrays"));
244 (ctxInfo.hasExtension("GL_EXT_draw_instanced") &&
245 ctxInfo.hasExtension("GL_EXT_instanced_arrays")) ||
246 ctxInfo.hasExtension("GL_ANGLE_instanced_arrays");
259 if (GR_IS_GR_GL_ES(standard) && ctxInfo.isOverCommandBuffer() && version < GR_GL_VER(3, 0)) {
271 if (version >= GR_GL_VER(3, 0) && ctxInfo.hasExtension("GL_EXT_blend_func_extended")) {
278 fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform_location");
281 if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_rectangle") ||
282 ctxInfo.hasExtension("GL_ANGLE_texture_rectangle")) {
286 fRectangleTextureSupport = ctxInfo.hasExtension("GL_ARB_texture_rectangle") ||
287 ctxInfo.hasExtension("GL_ANGLE_texture_rectangle");
295 if (version < GR_GL_VER(1, 3) && !ctxInfo.hasExtension("GL_ARB_texture_border_clamp")) {
300 if (version < GR_GL_VER(3, 2) && !ctxInfo.hasExtension("GL_EXT_texture_border_clamp") &&
301 !ctxInfo.hasExtension("GL_NV_texture_border_clamp") &&
302 !ctxInfo.hasExtension("GL_OES_texture_border_clamp")) {
311 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_swizzle")) {
337 fUseBufferDataNullHint = !GR_IS_GR_WEBGL(standard) && !ctxInfo.isOverCommandBuffer();
341 ctxInfo.hasExtension("GL_ARB_clear_texture"));
343 fClearTextureSupport = ctxInfo.hasExtension("GL_EXT_clear_texture");
354 ctxInfo.hasExtension("GL_ARB_framebuffer_sRGB") ||
355 ctxInfo.hasExtension("GL_EXT_framebuffer_sRGB");
359 fSRGBWriteControl = ctxInfo.hasExtension("GL_EXT_sRGB_write_control");
362 fSkipErrorChecks = ctxInfo.isOverCommandBuffer();
376 this->initGLSL(ctxInfo, gli);
383 ctxInfo.hasExtension("GL_ARB_blend_func_extended")) &&
384 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
389 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
391 shaderCaps->fNonsquareMatrixSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
392 shaderCaps->fInverseHyperbolicSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
394 shaderCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blend_func_extended");
397 ctxInfo.hasExtension("GL_OES_standard_derivatives");
400 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this value for GLSL ES 3.0.
401 shaderCaps->fNonsquareMatrixSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
402 shaderCaps->fInverseHyperbolicSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
405 ctxInfo.hasExtension("GL_OES_standard_derivatives") ||
406 ctxInfo.hasExtension("OES_standard_derivatives");
408 shaderCaps->fNonsquareMatrixSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
409 shaderCaps->fInverseHyperbolicSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
412 if (ctxInfo.hasExtension("GL_NV_conservative_raster")) {
422 ctxInfo.glslGeneration() < k130_GrGLSLGeneration; // introduced in GLSL 1.3
425 ctxInfo.glslGeneration() < k330_GrGLSLGeneration; // introduced in GLSL ES3
443 if (!ctxInfo.isOverCommandBuffer() && !fIsCoreProfile &&
444 (ctxInfo.vendor() == GrGLVendor::kARM ||
445 ctxInfo.vendor() == GrGLVendor::kImagination ||
446 ctxInfo.vendor() == GrGLVendor::kQualcomm)) {
453 this->initFSAASupport(contextOptions, ctxInfo, gli);
454 this->initStencilSupport(ctxInfo);
460 ctxInfo.hasExtension("GL_ARB_framebuffer_object") ||
461 ctxInfo.hasExtension("GL_EXT_framebuffer_blit")) {
466 ctxInfo.hasExtension("GL_NV_framebuffer_blit")) {
470 } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample") ||
471 ctxInfo.hasExtension("GL_ANGLE_framebuffer_blit")) {
482 this->initBlendEqationSupport(ctxInfo);
487 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffer_range")) {
496 if (ctxInfo.hasExtension("GL_CHROMIUM_map_sub")) {
499 } else if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_map_buffer_range")) {
502 } else if (ctxInfo.hasExtension("GL_OES_mapbuffer")) {
512 if (version >= GR_GL_VER(2, 1) || ctxInfo.hasExtension("GL_ARB_pixel_buffer_object") ||
513 ctxInfo.hasExtension("GL_EXT_pixel_buffer_object")) {
520 (ctxInfo.hasExtension("GL_NV_pixel_buffer_object") &&
522 ctxInfo.hasExtension("GL_EXT_unpack_subimage"))) {
531 // } else if (ctxInfo.hasExtension("GL_CHROMIUM_pixel_transfer_buffer_object")) {
548 fBufferMapThreshold = ctxInfo.isOverCommandBuffer() ? 0 : SK_MaxS32;
561 ctxInfo.hasExtension("GL_OES_texture_npot");
566 fMipmapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG_texture_npot");
584 if (ctxInfo.vendor() == GrGLVendor::kARM) {
589 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker");
592 fReuseScratchTextures = (ctxInfo.vendor() != GrGLVendor::kARM);
595 fReuseScratchBuffers = ctxInfo.vendor() != GrGLVendor::kARM
596 ctxInfo.vendor() != GrGLVendor::kQualcomm;
599 if (ctxInfo.hasExtension("GL_EXT_window_rectangles")) {
605 bool isANGLE = ctxInfo.angleBackend() != GrGLANGLEBackend::kUnknown ||
606 ctxInfo.isOverCommandBuffer();
611 if (ctxInfo.isOverCommandBuffer()) {
628 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
631 SkASSERT(ctxInfo.hasExtension("GL_EXT_framebuffer_object"));
645 ctxInfo.hasExtension("GL_ARB_base_instance");
648 ctxInfo.hasExtension("GL_ARB_draw_indirect");
649 if (version >= GR_GL_VER(4,3) || ctxInfo.hasExtension("GL_ARB_multi_draw_indirect")) {
655 if (ctxInfo.hasExtension("GL_ANGLE_base_vertex_base_instance")) {
662 fBaseVertexBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance");
671 fBaseVertexBaseInstanceSupport = ctxInfo.hasExtension(
673 if (fBaseVertexBaseInstanceSupport && ctxInfo.hasExtension(
684 if (ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D11) {
698 (version >= GR_GL_VER(3, 2) || ctxInfo.hasExtension("GL_ARB_sync"))) {
702 (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_APPLE_sync"))) {
705 } else if (ctxInfo.hasExtension("GL_NV_fence")) {
733 (version >= GR_GL_VER(3, 0)) || ctxInfo.hasExtension("GL_OES_get_program_binary");
744 version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_sampler_objects");
754 fTiledRenderingSupport = ctxInfo.hasExtension("GL_QCOM_tiled_rendering");
757 if (ctxInfo.vendor() == GrGLVendor::kARM) {
762 if (ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue) {
773 this->applyDriverCorrectnessWorkarounds(ctxInfo, contextOptions, gli, shaderCaps,
778 this->initFormatTable(ctxInfo, gli, formatWorkarounds);
842 bool is_float_fp32(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli, GrGLenum precision) {
843 if (GR_IS_GR_GL(ctxInfo.standard()) &&
844 ctxInfo.version() < GR_GL_VER(4,1) &&
845 !ctxInfo.hasExtension("GL_ARB_ES2_compatibility")) {
862 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
863 GrGLStandard standard = ctxInfo.standard();
864 GrGLVersion version = ctxInfo.version();
871 shaderCaps->fGLSLGeneration = ctxInfo.glslGeneration();
875 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
881 } else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) {
888 } else if (ctxInfo.hasExtension("GL_ARM_shader_framebuffer_fetch")) {
898 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
910 shaderCaps->fFlatInterpolationSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
913 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // This is the value for GLSL ES 3.0.
920 ctxInfo.vendor() != GrGLVendor::kQualcomm &&
921 ctxInfo.angleBackend() == GrGLANGLEBackend::kUnknown;
924 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
926 if (ctxInfo.hasExtension("GL_NV_shader_noperspective_interpolation") &&
927 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration /* GLSL ES 3.0 */) {
935 shaderCaps->fSampleMaskSupport = ctxInfo.glslGeneration() >= k400_GrGLSLGeneration;
937 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
939 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) {
948 ctxInfo.hasExtension("GL_ARB_tessellation_shader");
951 } else if (ctxInfo.hasExtension("GL_OES_tessellation_shader")) {
976 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) {
977 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
980 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") ||
981 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) {
991 shaderCaps->fVertexIDSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
997 shaderCaps->fVertexIDSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
1002 shaderCaps->fInfinitySupport = (ctxInfo.glslGeneration() >= k330_GrGLSLGeneration);
1010 (ctxInfo.glslGeneration() >= k330_GrGLSLGeneration);
1014 shaderCaps->fBitManipulationSupport = ctxInfo.glslGeneration() >= k400_GrGLSLGeneration;
1016 shaderCaps->fBitManipulationSupport = ctxInfo.glslGeneration() >= k310es_GrGLSLGeneration;
1019 shaderCaps->fFloatIs32Bits = is_float_fp32(ctxInfo, gli, GR_GL_HIGH_FLOAT);
1020 shaderCaps->fHalfIs32Bits = is_float_fp32(ctxInfo, gli, GR_GL_MEDIUM_FLOAT);
1021 shaderCaps->fHasLowFragmentPrecision = ctxInfo.renderer() == GrGLRenderer::kMali4xx;
1024 shaderCaps->fBuiltinFMASupport = ctxInfo.glslGeneration() >= k400_GrGLSLGeneration;
1026 shaderCaps->fBuiltinFMASupport = ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration;
1029 shaderCaps->fBuiltinDeterminantSupport = ctxInfo.glslGeneration() >= k150_GrGLSLGeneration;
1038 const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
1039 if (GR_IS_GR_GL(ctxInfo.standard())) {
1040 if (ctxInfo.version() >= GR_GL_VER(3,0) ||
1041 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
1043 } else if (ctxInfo.hasExtension("GL_EXT_framebuffer_multisample") &&
1044 ctxInfo.hasExtension("GL_EXT_framebuffer_blit")) {
1047 } else if (GR_IS_GR_GL_ES(ctxInfo.standard())) {
1050 if (ctxInfo.hasExtension("GL_EXT_multisampled_render_to_texture")) {
1053 } else if (ctxInfo.hasExtension("GL_IMG_multisampled_render_to_texture")) {
1056 } else if (ctxInfo.version() >= GR_GL_VER(3,0)) {
1058 } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
1060 } else if (ctxInfo.hasExtension("GL_ANGLE_framebuffer_multisample")) {
1062 } else if (ctxInfo.hasExtension("GL_APPLE_framebuffer_multisample")) {
1065 } else if (GR_IS_GR_WEBGL(ctxInfo.standard())) {
1067 if (ctxInfo.version() >= GR_GL_VER(2,0)) {
1075 void GrGLCaps::initBlendEqationSupport(const GrGLContextInfo& ctxInfo) {
1086 if (ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) {
1089 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") &&
1093 } else if (ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) {
1096 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") && layoutQualifierSupport) {
1103 void GrGLCaps::initStencilSupport(const GrGLContextInfo& ctxInfo) {
1111 if (GR_IS_GR_GL(ctxInfo.standard())) {
1113 ctxInfo.version() >= GR_GL_VER(3,0) ||
1114 ctxInfo.hasExtension("GL_EXT_packed_depth_stencil") ||
1115 ctxInfo.hasExtension("GL_ARB_framebuffer_object");
1125 } else if (GR_IS_GR_GL_ES(ctxInfo.standard())) {
1130 if (ctxInfo.version() >= GR_GL_VER(3,0) ||
1131 ctxInfo.hasExtension("GL_OES_packed_depth_stencil")) {
1134 } else if (GR_IS_GR_WEBGL(ctxInfo.standard())) {
1136 if (ctxInfo.version() >= GR_GL_VER(2,0)) {
1343 void GrGLCaps::initFormatTable(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli,
1345 GrGLStandard standard = ctxInfo.standard();
1348 GrGLVersion version = ctxInfo.version();
1360 ctxInfo.hasExtension("GL_ARB_texture_storage") ||
1361 ctxInfo.hasExtension("GL_EXT_texture_storage");
1364 ctxInfo.hasExtension("GL_EXT_texture_storage");
1411 if (version >= GR_GL_VER(3,0) || ctxInfo.hasExtension("GL_OES_rgb8_rgba8") ||
1412 ctxInfo.hasExtension("GL_ARM_rgba8")) {
1428 (version >= GR_GL_VER(1, 2) || ctxInfo.hasExtension("GL_EXT_bgra"));
1532 r8Support = version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_texture_rg");
1534 r8Support = version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_texture_rg");
1536 r8Support = ctxInfo.version() >= GR_GL_VER(2, 0);
1645 (alpha8IsValidForGLES && ctxInfo.hasExtension("GL_EXT_texture_storage"));
1652 alpha8IsRenderable = ctxInfo.version() >= GR_GL_VER(3, 0) ||
1653 ctxInfo.hasExtension("GL_ARB_framebuffer_object");
1742 lum8SizedFormatSupported = ctxInfo.hasExtension("GL_EXT_texture_storage");
1822 la8SizedFormatSupported = ctxInfo.hasExtension("GL_EXT_texture_storage");
1909 if (ctxInfo.hasExtension("GL_EXT_texture_format_BGRA8888")) {
1930 if (ctxInfo.hasExtension("GL_EXT_texture_format_BGRA8888")) {
1937 if (ctxInfo.hasExtension("GL_EXT_texture_storage") &&
1941 } else if (ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888")) {
2017 if (version >= GR_GL_VER(4, 2) || ctxInfo.hasExtension("GL_ARB_ES2_compatibility")) {
2100 } else if (ctxInfo.hasExtension("GL_ARB_texture_float")) {
2108 ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") ||
2109 ctxInfo.hasExtension("GL_EXT_color_buffer_float");
2110 } else if (ctxInfo.hasExtension("GL_OES_texture_half_float") &&
2111 ctxInfo.hasExtension("GL_OES_texture_half_float_linear")) {
2113 rgba16FRenderTargetSupport = ctxInfo.hasExtension("GL_EXT_color_buffer_half_float");
2119 ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") ||
2120 ctxInfo.hasExtension("EXT_color_buffer_half_float") ||
2121 ctxInfo.hasExtension("GL_EXT_color_buffer_float") ||
2122 ctxInfo.hasExtension("EXT_color_buffer_float");
2123 } else if ((ctxInfo.hasExtension("GL_OES_texture_half_float") ||
2124 ctxInfo.hasExtension("OES_texture_half_float")) &&
2125 (ctxInfo.hasExtension("GL_OES_texture_half_float_linear") ||
2126 ctxInfo.hasExtension("OES_texture_half_float_linear"))) {
2130 ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") ||
2131 ctxInfo.hasExtension("EXT_color_buffer_half_float");
2235 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_texture_rg")) {
2248 ctxInfo.hasExtension("GL_EXT_color_buffer_float") ||
2249 ctxInfo.hasExtension("GL_EXT_color_buffer_half_float");
2254 r16FRenderTargetSupport = ctxInfo.hasExtension("GL_EXT_color_buffer_float") ||
2255 ctxInfo.hasExtension("EXT_color_buffer_float");
2321 if (!fIsCoreProfile && ctxInfo.hasExtension("GL_ARB_texture_float")) {
2326 if (ctxInfo.hasExtension("GL_OES_texture_half_float_linear") &&
2327 ctxInfo.hasExtension("GL_OES_texture_half_float")) {
2330 lum16FSizedFormatSupported = ctxInfo.hasExtension("GL_EXT_texture_storage");
2417 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_OES_rgb8_rgba8")) {
2477 rg8Support = version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_texture_rg");
2479 rg8Support = version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_texture_rg");
2550 ctxInfo.hasExtension("GL_EXT_texture_type_2_10_10_10_REV")) {
2564 (version >= GR_GL_VER(1, 2) || ctxInfo.hasExtension("GL_EXT_bgra"));
2718 } else if (ctxInfo.hasExtension("GL_EXT_texture_sRGB")) {
2720 if (ctxInfo.hasExtension("GL_ARB_framebuffer_sRGB") ||
2721 ctxInfo.hasExtension("GL_EXT_framebuffer_sRGB")) {
2726 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_sRGB")) {
2739 if (version >= GR_GL_VER(2, 0) || ctxInfo.hasExtension("GL_EXT_sRGB") ||
2740 ctxInfo.hasExtension("EXT_sRGB")) {
2816 if (ctxInfo.hasExtension("GL_EXT_texture_compression_s3tc")) {
2830 if (ctxInfo.hasExtension("GL_EXT_texture_compression_s3tc")) {
2846 ctxInfo.hasExtension("GL_ARB_ES3_compatibility")) {
2851 ctxInfo.hasExtension("GL_OES_compressed_ETC2_RGB8_texture")) {
2866 if (ctxInfo.hasExtension("GL_OES_compressed_ETC1_RGB8_texture")) {
2881 if (ctxInfo.hasExtension("GL_OES_texture_compression_astc")) {
2896 if (ctxInfo.hasExtension("GL_OES_texture_compression_astc")) {
2911 if (ctxInfo.hasExtension("GL_OES_texture_compression_astc")) {
2931 ctxInfo.hasExtension("GL_ARB_texture_rg");
2933 r16Supported = ctxInfo.hasExtension("GL_EXT_texture_norm16");
3007 ctxInfo.hasExtension("GL_ARB_texture_rg");
3009 rg16Supported = ctxInfo.hasExtension("GL_EXT_texture_norm16");
3074 rgba16Support = ctxInfo.hasExtension("GL_EXT_texture_norm16");
3144 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_texture_float")) {
3157 ctxInfo.hasExtension("GL_EXT_color_buffer_float") ||
3158 ctxInfo.hasExtension("GL_EXT_color_buffer_half_float");
3163 rg16FRenderTargetSupport = ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") ||
3164 ctxInfo.hasExtension("EXT_color_buffer_half_float") ||
3165 ctxInfo.hasExtension("GL_EXT_color_buffer_float") ||
3166 ctxInfo.hasExtension("EXT_color_buffer_float");
3230 this->setupSampleCounts(ctxInfo, gli);
3261 void GrGLCaps::setupSampleCounts(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
3262 GrGLStandard standard = ctxInfo.standard();
3265 GrGLVersion version = ctxInfo.version();
3273 ctxInfo.hasExtension("GL_ARB_internalformat_query"))) ||
3583 void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
3590 if (ctxInfo.renderer() == GrGLRenderer::kAdreno430 ||
3591 ctxInfo.renderer() == GrGLRenderer::kAdreno4xx_other ||
3596 if (ctxInfo.renderer() == GrGLRenderer::kIntelCherryView) {
3608 if (GR_IS_GR_GL(ctxInfo.standard()) && ctxInfo.driver() == GrGLDriver::kNVIDIA &&
3609 ctxInfo.driverVersion() < GR_GL_DRIVER_VER(367, 57, 0)) {
3615 if (ctxInfo.vendor() == GrGLVendor::kQualcomm ||
3616 ctxInfo.renderer() == GrGLRenderer::kMali4xx ||
3617 ctxInfo.renderer() == GrGLRenderer::kTegra_PreK1) {
3623 ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D11) {
3628 if (GR_IS_GR_WEBGL(ctxInfo.standard())) {
3647 if (ctxInfo.renderer() == GrGLRenderer::kAdreno3xx &&
3648 ctxInfo.driverVersion() > GR_GL_DRIVER_VER(127, 0, 0)) {
3658 if (ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D9 ||
3659 ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D11) {
3664 if (ctxInfo.renderer() == GrGLRenderer::kPowerVR54x) {
3669 if (ctxInfo.renderer() == GrGLRenderer::kPowerVR54x) {
3676 if (ctxInfo.isOverCommandBuffer() && ctxInfo.version() >= GR_GL_VER(3,0)) {
3688 if (ctxInfo.renderer() == GrGLRenderer::kAdreno615 ||
3689 ctxInfo.renderer() == GrGLRenderer::kAdreno620) {
3695 if (ctxInfo.renderer() == GrGLRenderer::kPowerVR54x ||
3696 ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue ||
3697 (ctxInfo.renderer() == GrGLRenderer::kAdreno3xx && !ctxInfo.isOverCommandBuffer())) {
3703 if (ctxInfo.renderer() == GrGLRenderer::kAMDRadeonHD7xxx ||
3704 ctxInfo.renderer() == GrGLRenderer::kAMDRadeonR9M4xx) {
3717 if (ctxInfo.vendor() == GrGLVendor::kIntel &&
3718 (ctxInfo.driverVersion() < GR_GL_DRIVER_VER(10, 30, 12) ||
3719 ctxInfo.renderer() == GrGLRenderer::kIntelBroadwell)) {
3725 if (ctxInfo.vendor() == GrGLVendor::kNVIDIA) {
3734 if (ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D11) {
3738 if (ctxInfo.renderer() == GrGLRenderer::kAdreno430 ||
3739 ctxInfo.renderer() == GrGLRenderer::kAdreno4xx_other) {
3741 if (ctxInfo.driverVersion() <= GR_GL_DRIVER_VER(219, 0, 0)) {
3748 if (ctxInfo.driverVersion() < GR_GL_DRIVER_VER(145, 0, 0)) {
3758 if (ctxInfo.vendor() == GrGLVendor::kQualcomm) {
3772 if (ctxInfo.renderer() == GrGLRenderer::kAdreno3xx &&
3773 ctxInfo.driverVersion() > GR_GL_DRIVER_VER(53, 0, 0)) {
3778 if (ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue) {
3788 if (ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue) {
3811 if (ctxInfo.renderer() == GrGLRenderer::kTegra_PreK1) {
3829 if (ctxInfo.vendor() == GrGLVendor::kImagination) {
3839 !ctxInfo.isOverCommandBuffer() && // http://crbug.com/1224110
3841 ctxInfo.vendor() == GrGLVendor::kIntel ||
3842 (ctxInfo.driver() == GrGLDriver::kNVIDIA && isMAC) ||
3843 ctxInfo.vendor() == GrGLVendor::kATI)) {
3849 if (ctxInfo.renderer() == GrGLRenderer::kIntelBroadwell) {
3853 if (ctxInfo.vendor() == GrGLVendor::kQualcomm) {
3858 if (ctxInfo.renderer() == GrGLRenderer::kVirgl) {
3872 if (ctxInfo.renderer() == GrGLRenderer::kAdreno530 ||
3873 ctxInfo.renderer() == GrGLRenderer::kAdreno5xx_other) {
3881 shaderCaps->fCanUseAnyFunctionInShader = (ctxInfo.vendor() != GrGLVendor::kImagination);
3883 if (ctxInfo.renderer() == GrGLRenderer::kTegra_PreK1) {
3899 if (ctxInfo.vendor() == GrGLVendor::kIntel) {
3904 if (ctxInfo.vendor() == GrGLVendor::kATI) {
3915 if (ctxInfo.vendor() == GrGLVendor::kIntel) {
3922 if (shaderCaps->fFBFetchSupport && ctxInfo.vendor() == GrGLVendor::kQualcomm) {
3932 if (ctxInfo.renderer() == GrGLRenderer::kMaliT) {
3939 if (ctxInfo.renderer() == GrGLRenderer::kMaliG) {
3944 if (ctxInfo.renderer() == GrGLRenderer::kMali4xx) {
3961 if (ctxInfo.angleBackend() != GrGLANGLEBackend::kUnknown || ctxInfo.isOverCommandBuffer()) {
3967 if (ctxInfo.renderer() == GrGLRenderer::kAdreno530 ||
3968 ctxInfo.renderer() == GrGLRenderer::kAdreno5xx_other ||
3969 ctxInfo.renderer() == GrGLRenderer::kAdreno615 ||
3970 ctxInfo.renderer() == GrGLRenderer::kAdreno620 ||
3971 ctxInfo.renderer() == GrGLRenderer::kAdreno630 ||
3972 ctxInfo.renderer() == GrGLRenderer::kAdreno640 ||
3973 ctxInfo.renderer() == GrGLRenderer::kAdreno6xx_other) {
3981 if (ctxInfo.renderer() == GrGLRenderer::kAdreno3xx) {
3986 if (ctxInfo.renderer() == GrGLRenderer::kTegra_PreK1) {
3992 if (ctxInfo.vendor() == GrGLVendor::kARM) {
4020 if (ctxInfo.renderer() == GrGLRenderer::kAdreno3xx ||
4021 ctxInfo.renderer() == GrGLRenderer::kAdreno4xx_other) {
4027 if (ctxInfo.renderer() == GrGLRenderer::kAdreno430 ||
4028 ctxInfo.renderer() == GrGLRenderer::kAdreno4xx_other ||
4029 ctxInfo.renderer() == GrGLRenderer::kAdreno530 ||
4030 ctxInfo.renderer() == GrGLRenderer::kAdreno5xx_other ||
4031 ctxInfo.driver() == GrGLDriver::kIntel ||
4032 ctxInfo.isOverCommandBuffer() ||
4033 ctxInfo.vendor() == GrGLVendor::kARM /* http://skbug.com/11906 */) {
4039 if (ctxInfo.driver() == GrGLDriver::kNVIDIA &&
4040 ctxInfo.driverVersion() < GR_GL_DRIVER_VER(337, 00, 0) &&
4052 if (ctxInfo.driver() == GrGLDriver::kNVIDIA &&
4053 ctxInfo.driverVersion() < GR_GL_DRIVER_VER(355, 00, 0)) {
4058 if (ctxInfo.vendor() == GrGLVendor::kARM) {
4069 if (ctxInfo.renderer() == GrGLRenderer::kAdreno530 ||
4070 ctxInfo.renderer() == GrGLRenderer::kAdreno5xx_other ||
4071 ctxInfo.renderer() == GrGLRenderer::kAdreno620 ||
4072 ctxInfo.renderer() == GrGLRenderer::kAdreno640) {
4080 if (ctxInfo.hasExtension("GL_OES_EGL_image_external") &&
4081 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration &&
4100 if (ctxInfo.vendor() == GrGLVendor::kIntel || // IntelIris640 drops draws completely.
4101 ctxInfo.renderer() == GrGLRenderer::kMaliT || // Some curves appear flat on GalaxyS6.
4102 ctxInfo.renderer() == GrGLRenderer::kAdreno3xx ||
4103 ctxInfo.renderer() == GrGLRenderer::kAdreno430 ||
4104 ctxInfo.renderer() == GrGLRenderer::kAdreno4xx_other || // We get garbage on Adreno405.
4105 ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D9) { // D3D9 conic strokes fail.
4115 if (ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue) {
4121 ctxInfo.driver() == GrGLDriver::kNVIDIA &&
4122 ctxInfo.hasExtension("GL_NV_conservative_raster_pre_snap_triangles") && // Pascal+.
4123 !ctxInfo.hasExtension("GL_NV_conservative_raster_underestimation"); // Volta+.
4124 if (isNVIDIAPascal && ctxInfo.driverVersion() < GR_GL_DRIVER_VER(440, 00, 0)) {
4125 if (GR_IS_GR_GL(ctxInfo.standard())) {
4127 if (ctxInfo.version() >= GR_GL_VER(4,2)) {
4134 if (ctxInfo.version() >= GR_GL_VER(3,1)) {
4142 if (ctxInfo.driver() == GrGLDriver::kQualcomm) {
4150 if (ctxInfo.driver() == GrGLDriver::kIntel ||
4151 (ctxInfo.angleVendor() == GrGLVendor::kIntel &&
4152 ctxInfo.angleBackend() == GrGLANGLEBackend::kOpenGL)) {
4159 if (ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue) {
4167 if (ctxInfo.vendor() == GrGLVendor::kQualcomm &&
4168 k320es_GrGLSLGeneration != ctxInfo.glslGeneration()) {
4174 if (ctxInfo.renderer() == GrGLRenderer::kAdreno430 ||
4175 ctxInfo.renderer() == GrGLRenderer::kAdreno4xx_other) {
4181 if (ctxInfo.vendor() == GrGLVendor::kATI) {
4189 ctxInfo.isOverCommandBuffer() && ctxInfo.version() < GR_GL_VER(3, 0);
4195 ctxInfo.driver() == GrGLDriver::kIntel && GR_IS_GR_GL_ES(ctxInfo.standard());
4204 formatWorkarounds->fDisableLuminance16F = ctxInfo.renderer() == GrGLRenderer::kIntelBroadwell ||
4205 ctxInfo.vendor() == GrGLVendor::kQualcomm;
4212 ctxInfo.renderer() == GrGLRenderer::kAMDRadeonR9M3xx ||
4213 ctxInfo.renderer() == GrGLRenderer::kAMDRadeonPro5xxx ||
4214 ctxInfo.renderer() == GrGLRenderer::kAMDRadeonProVegaxx;
4226 if (ctxInfo.vendor() == GrGLVendor::kNVIDIA) {
4232 if (ctxInfo.driver() == GrGLDriver::kAndroidEmulator) {
4237 if (ctxInfo.renderer() == GrGLRenderer::kAdreno3xx) {
4252 if (ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D9) {
4259 if (ctxInfo.vendor() == GrGLVendor::kIntel ||
4260 ctxInfo.angleVendor() == GrGLVendor::kIntel) {
4265 if (ctxInfo.angleBackend() != GrGLANGLEBackend::kUnknown) {
4270 if (ctxInfo.angleBackend() == GrGLANGLEBackend::kD3D9 &&
4271 ctxInfo.angleVendor() == GrGLVendor::kATI) {
4278 if (ctxInfo.renderer() == GrGLRenderer::kAdreno530) {
4288 if ((ctxInfo.renderer() == GrGLRenderer::kAdreno620 ||
4289 ctxInfo.renderer() == GrGLRenderer::kAdreno640) &&
4290 ctxInfo.driverVersion() < GR_GL_DRIVER_VER(571, 0, 0)) {
4295 if (ctxInfo.renderer() == GrGLRenderer::kGoogleSwiftShader) {
4303 if (ctxInfo.renderer() == GrGLRenderer::kPowerVRRogue &&
4304 ctxInfo.driver() == GrGLDriver::kImagination &&
4305 ctxInfo.driverVersion() < GR_GL_DRIVER_VER(1, 16, 0)) {
4309 if (ctxInfo.driver() == GrGLDriver::kFreedreno) {
4336 if ((ctxInfo.renderer() == GrGLRenderer::kAdreno3xx &&
4337 ctxInfo.driver() == GrGLDriver::kQualcomm) ||
4338 (ctxInfo.renderer() == GrGLRenderer::kMaliG)) {
4355 if (ctxInfo.renderer() == GrGLRenderer::kMaliT &&
4356 ctxInfo.driver() == GrGLDriver::kARM &&
4357 ctxInfo.driverVersion() < GR_GL_DRIVER_VER(1, 26, 0)) {