Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1013)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1185573003: Import new functionality for GL4 backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix KHR_debug suffixes Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 91cf83147cfcb488ad1c334064af79945ff21b3f..eacf6f60847589f35375b66901c4b26855ee34b8 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -39,6 +39,9 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fTwoFormatLimit = false;
fFragCoordsConventionSupport = false;
fVertexArrayObjectSupport = false;
+ fInstancedDrawingSupport = false;
+ fDirectStateAccessSupport = false;
+ fDebugSupport = false;
fES2CompatibilitySupport = false;
fMultisampleDisableSupport = false;
fUseNonVBOVertexAndIndexDynamicData = false;
@@ -89,6 +92,8 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
}
}
+ glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_texture");
+
// Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader
glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor();
@@ -230,6 +235,28 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
ctxInfo.hasExtension("GL_OES_vertex_array_object");
}
+ if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3,2)) ||
+ (kGLES_GrGLStandard == standard && version >= GR_GL_VER(3,0))) {
+ fInstancedDrawingSupport = true;
+ } else {
+ fInstancedDrawingSupport = (ctxInfo.hasExtension("GL_ARB_draw_instanced") ||
+ ctxInfo.hasExtension("GL_EXT_draw_instanced")) &&
+ (ctxInfo.hasExtension("GL_ARB_instanced_arrays") ||
+ ctxInfo.hasExtension("GL_EXT_instanced_arrays"));
+ }
+
+ if (kGL_GrGLStandard == standard) {
+ fDirectStateAccessSupport = ctxInfo.hasExtension("GL_EXT_direct_state_access");
+ } else {
+ fDirectStateAccessSupport = false;
+ }
+
+ if (kGL_GrGLStandard == standard && version >= GR_GL_VER(4,3)) {
+ fDebugSupport = true;
+ } else {
+ fDebugSupport = ctxInfo.hasExtension("GL_KHR_debug");
+ }
+
if (kGL_GrGLStandard == standard) {
fES2CompatibilitySupport = ctxInfo.hasExtension("GL_ARB_ES2_compatibility");
}
@@ -254,9 +281,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
// We only support v1.3+ of GL_NV_path_rendering which allows us to
// set individual fragment inputs with ProgramPathFragmentInputGen. The API
// additions are detected by checking the existence of the function.
- glslCaps->fPathRenderingSupport =
- ctxInfo.hasExtension("GL_EXT_direct_state_access") &&
- ((ctxInfo.version() >= GR_GL_VER(4, 3) ||
+ glslCaps->fPathRenderingSupport = ((ctxInfo.version() >= GR_GL_VER(4, 3) ||
ctxInfo.hasExtension("GL_ARB_program_interface_query")) &&
gli->fFunctions.fProgramPathFragmentInputGen);
}
@@ -1023,6 +1048,9 @@ SkString GrGLCaps::dump() const {
r.appendf("Fragment coord conventions support: %s\n",
(fFragCoordsConventionSupport ? "YES": "NO"));
r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
+ r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YES": "NO"));
+ r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO"));
+ r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO"));
r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO"));
r.appendf("Use non-VBO for dynamic data: %s\n",
(fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
@@ -1039,6 +1067,7 @@ GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options,
fDropsTileOnZeroDivide = false;
fFBFetchSupport = false;
fFBFetchNeedsCustomOutput = false;
+ fBindlessTextureSupport = false;
fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
fFBFetchColorName = NULL;
fFBFetchExtensionString = NULL;
@@ -1063,6 +1092,7 @@ SkString GrGLSLCaps::dump() const {
r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO"));
r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
+ r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO"));
r.appendf("Advanced blend equation interaction: %s\n",
kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
return r;
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698