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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 2095183002: Add a GL cap for instanced rendering to floating point (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 22 matching lines...) Expand all
33 fTextureUsageSupport = false; 33 fTextureUsageSupport = false;
34 fTextureRedSupport = false; 34 fTextureRedSupport = false;
35 fImagingSupport = false; 35 fImagingSupport = false;
36 fVertexArrayObjectSupport = false; 36 fVertexArrayObjectSupport = false;
37 fDirectStateAccessSupport = false; 37 fDirectStateAccessSupport = false;
38 fDebugSupport = false; 38 fDebugSupport = false;
39 fES2CompatibilitySupport = false; 39 fES2CompatibilitySupport = false;
40 fDrawIndirectSupport = false; 40 fDrawIndirectSupport = false;
41 fMultiDrawIndirectSupport = false; 41 fMultiDrawIndirectSupport = false;
42 fBaseInstanceSupport = false; 42 fBaseInstanceSupport = false;
43 fCanDrawIndirectToFloat = false;
43 fUseNonVBOVertexAndIndexDynamicData = false; 44 fUseNonVBOVertexAndIndexDynamicData = false;
44 fIsCoreProfile = false; 45 fIsCoreProfile = false;
45 fBindFragDataLocationSupport = false; 46 fBindFragDataLocationSupport = false;
46 fRectangleTextureSupport = false; 47 fRectangleTextureSupport = false;
47 fTextureSwizzleSupport = false; 48 fTextureSwizzleSupport = false;
48 fRGBA8888PixelsOpsAreSlow = false; 49 fRGBA8888PixelsOpsAreSlow = false;
49 fPartialFBOReadIsSlow = false; 50 fPartialFBOReadIsSlow = false;
50 fMipMapLevelAndLodControlSupport = false; 51 fMipMapLevelAndLodControlSupport = false;
51 fRGBAToBGRAReadbackConversionsAreSlow = false; 52 fRGBAToBGRAReadbackConversionsAreSlow = false;
52 fDoManualMipmapping = false; 53 fDoManualMipmapping = false;
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 fBaseInstanceSupport = version >= GR_GL_VER(4,2); 524 fBaseInstanceSupport = version >= GR_GL_VER(4,2);
524 fMultiDrawIndirectSupport = version >= GR_GL_VER(4,3) || 525 fMultiDrawIndirectSupport = version >= GR_GL_VER(4,3) ||
525 (!fBaseInstanceSupport && // The ARB extensi on has no base inst. 526 (!fBaseInstanceSupport && // The ARB extensi on has no base inst.
526 ctxInfo.hasExtension("GL_ARB_multi_draw_ind irect")); 527 ctxInfo.hasExtension("GL_ARB_multi_draw_ind irect"));
527 } else { 528 } else {
528 fDrawIndirectSupport = version >= GR_GL_VER(3,1); 529 fDrawIndirectSupport = version >= GR_GL_VER(3,1);
529 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi rect"); 530 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi rect");
530 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance"); 531 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance");
531 } 532 }
532 533
534 // OS X doesn't seem to write correctly to floating point textures when usin g glDraw*Indirect,
535 // regardless of the underlying GPU.
536 #ifndef SK_BUILD_FOR_MAC
537 if (fDrawIndirectSupport) {
538 fCanDrawIndirectToFloat = true;
539 }
540 #endif
541
533 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); 542 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps);
534 543
535 if (contextOptions.fUseShaderSwizzling) { 544 if (contextOptions.fUseShaderSwizzling) {
536 fTextureSwizzleSupport = false; 545 fTextureSwizzleSupport = false;
537 } 546 }
538 547
539 if (kGL_GrGLStandard == standard) { 548 if (kGL_GrGLStandard == standard) {
540 if ((version >= GR_GL_VER(4, 0) || ctxInfo.hasExtension("GL_ARB_sample_s hading")) && 549 if ((version >= GR_GL_VER(4, 0) || ctxInfo.hasExtension("GL_ARB_sample_s hading")) &&
541 ctxInfo.vendor() != kIntel_GrGLVendor) { 550 ctxInfo.vendor() != kIntel_GrGLVendor) {
542 fSampleShadingSupport = true; 551 fSampleShadingSupport = true;
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 1114
1106 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO" )); 1115 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO" ));
1107 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); 1116 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO"));
1108 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 1117 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
1109 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 1118 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
1110 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO")); 1119 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO"));
1111 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); 1120 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO"));
1112 r.appendf("Draw indirect support: %s\n", (fDrawIndirectSupport ? "YES" : "NO ")); 1121 r.appendf("Draw indirect support: %s\n", (fDrawIndirectSupport ? "YES" : "NO "));
1113 r.appendf("Multi draw indirect support: %s\n", (fMultiDrawIndirectSupport ? "YES" : "NO")); 1122 r.appendf("Multi draw indirect support: %s\n", (fMultiDrawIndirectSupport ? "YES" : "NO"));
1114 r.appendf("Base instance support: %s\n", (fBaseInstanceSupport ? "YES" : "NO ")); 1123 r.appendf("Base instance support: %s\n", (fBaseInstanceSupport ? "YES" : "NO "));
1124 r.appendf("Can draw indirect to float: %s\n", (fCanDrawIndirectToFloat ? "YE S" : "NO"));
1115 r.appendf("Use non-VBO for dynamic data: %s\n", 1125 r.appendf("Use non-VBO for dynamic data: %s\n",
1116 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 1126 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
1117 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO")); 1127 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO"));
1118 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO")); 1128 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO"));
1119 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor t ? "YES" : "NO")); 1129 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor t ? "YES" : "NO"));
1120 r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES " : "NO")); 1130 r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES " : "NO"));
1121 r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO")); 1131 r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO"));
1122 r.appendf("BGRA to RGBA readback conversions are slow: %s\n", 1132 r.appendf("BGRA to RGBA readback conversions are slow: %s\n",
1123 (fRGBAToBGRAReadbackConversionsAreSlow ? "YES" : "NO")); 1133 (fRGBAToBGRAReadbackConversionsAreSlow ? "YES" : "NO"));
1124 1134
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1936 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1927 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1937 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1928 fConfigTable[i].fFormats.fExternalFormat[j]); 1938 fConfigTable[i].fFormats.fExternalFormat[j]);
1929 } 1939 }
1930 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1940 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1931 } 1941 }
1932 #endif 1942 #endif
1933 } 1943 }
1934 1944
1935 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1945 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698