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

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

Issue 1666803002: Add GL indirect drawing APIs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_rastermultisample
Patch Set: Created 4 years, 10 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
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 #ifndef GrGLCaps_DEFINED 9 #ifndef GrGLCaps_DEFINED
10 #define GrGLCaps_DEFINED 10 #define GrGLCaps_DEFINED
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 /// Is there support for GL_KHR_debug? 277 /// Is there support for GL_KHR_debug?
278 bool debugSupport() const { return fDebugSupport; } 278 bool debugSupport() const { return fDebugSupport; }
279 279
280 /// Is there support for ES2 compatability? 280 /// Is there support for ES2 compatability?
281 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } 281 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; }
282 282
283 /// Can we call glDisable(GL_MULTISAMPLE)? 283 /// Can we call glDisable(GL_MULTISAMPLE)?
284 bool multisampleDisableSupport() const { return fMultisampleDisableSupport; } 284 bool multisampleDisableSupport() const { return fMultisampleDisableSupport; }
285 285
286 /// Is there support for glDraw*Indirect? Note that the baseInstance fields of indirect draw
287 /// commands cannot be used unless we have base instance support.
288 bool drawIndirectSupport() const {
bsalomon 2016/02/04 16:33:41 maybe make these one line just to match the simila
Chris Dalton 2016/02/04 20:45:55 Oops, don't know how I missed that :-\
289 return fDrawIndirectSupport;
290 }
291
292 /// Is there support for glMultiDraw*Indirect? Note that the baseInstance fi elds of indirect
293 /// draw commands cannot be used unless we have base instance support.
294 bool multiDrawIndirectSupport() const {
295 return fMultiDrawIndirectSupport;
296 }
297
298 /// Are the baseInstance fields supported in indirect draw commands?
299 bool baseInstanceSupport() const {
300 return fBaseInstanceSupport;
301 }
302
286 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte nt. 303 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte nt.
287 bool useNonVBOVertexAndIndexDynamicData() const { return fUseNonVBOVertexAnd IndexDynamicData; } 304 bool useNonVBOVertexAndIndexDynamicData() const { return fUseNonVBOVertexAnd IndexDynamicData; }
288 305
289 /// Does ReadPixels support reading readConfig pixels from a FBO that is ren derTargetConfig? 306 /// Does ReadPixels support reading readConfig pixels from a FBO that is ren derTargetConfig?
290 bool readPixelsSupported(GrPixelConfig renderTargetConfig, 307 bool readPixelsSupported(GrPixelConfig renderTargetConfig,
291 GrPixelConfig readConfig, 308 GrPixelConfig readConfig,
292 std::function<void (GrGLenum, GrGLint*)> getInteger v, 309 std::function<void (GrGLenum, GrGLint*)> getInteger v,
293 std::function<bool ()> bindRenderTarget) const; 310 std::function<bool ()> bindRenderTarget) const;
294 311
295 bool isCoreProfile() const { return fIsCoreProfile; } 312 bool isCoreProfile() const { return fIsCoreProfile; }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 bool fPackFlipYSupport : 1; 388 bool fPackFlipYSupport : 1;
372 bool fTextureUsageSupport : 1; 389 bool fTextureUsageSupport : 1;
373 bool fTexStorageSupport : 1; 390 bool fTexStorageSupport : 1;
374 bool fTextureRedSupport : 1; 391 bool fTextureRedSupport : 1;
375 bool fImagingSupport : 1; 392 bool fImagingSupport : 1;
376 bool fVertexArrayObjectSupport : 1; 393 bool fVertexArrayObjectSupport : 1;
377 bool fDirectStateAccessSupport : 1; 394 bool fDirectStateAccessSupport : 1;
378 bool fDebugSupport : 1; 395 bool fDebugSupport : 1;
379 bool fES2CompatibilitySupport : 1; 396 bool fES2CompatibilitySupport : 1;
380 bool fMultisampleDisableSupport : 1; 397 bool fMultisampleDisableSupport : 1;
398 bool fDrawIndirectSupport : 1;
399 bool fMultiDrawIndirectSupport : 1;
400 bool fBaseInstanceSupport : 1;
381 bool fUseNonVBOVertexAndIndexDynamicData : 1; 401 bool fUseNonVBOVertexAndIndexDynamicData : 1;
382 bool fIsCoreProfile : 1; 402 bool fIsCoreProfile : 1;
383 bool fBindFragDataLocationSupport : 1; 403 bool fBindFragDataLocationSupport : 1;
384 bool fSRGBWriteControl : 1; 404 bool fSRGBWriteControl : 1;
385 bool fRGBA8888PixelsOpsAreSlow : 1; 405 bool fRGBA8888PixelsOpsAreSlow : 1;
386 bool fPartialFBOReadIsSlow : 1; 406 bool fPartialFBOReadIsSlow : 1;
387 bool fBindUniformLocationSupport : 1; 407 bool fBindUniformLocationSupport : 1;
388 bool fExternalTextureSupport : 1; 408 bool fExternalTextureSupport : 1;
389 bool fRectangleTextureSupport : 1; 409 bool fRectangleTextureSupport : 1;
390 bool fTextureSwizzleSupport : 1; 410 bool fTextureSwizzleSupport : 1;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 476
457 GrSwizzle fSwizzle; 477 GrSwizzle fSwizzle;
458 }; 478 };
459 479
460 ConfigInfo fConfigTable[kGrPixelConfigCnt]; 480 ConfigInfo fConfigTable[kGrPixelConfigCnt];
461 481
462 typedef GrCaps INHERITED; 482 typedef GrCaps INHERITED;
463 }; 483 };
464 484
465 #endif 485 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698