Add GL_QCOM_TILED_RENDERING as an optional interface
Change-Id: I29b53e674cd788ac188295060028bbb7805858a4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246281 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
cb0a2db1a2
commit
38f0a4972a
@ -143,3 +143,5 @@ Milestone 78
|
||||
* Changed GrContextOptions' fDisallowGLSLBinaryCaching to fShaderCacheStrategy,
|
||||
and allow caching SkSL.
|
||||
https://review.skia.org/238856
|
||||
|
||||
* Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
|
||||
|
@ -252,6 +252,10 @@ using GrGLObjectLabelFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum identifier, GrGL
|
||||
/** EXT_window_rectangles */
|
||||
using GrGLWindowRectanglesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, const GrGLint box[]);
|
||||
|
||||
/** GL_QCOM_tiled_rendering */
|
||||
using GrGLStartTilingFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint x, GrGLuint y, GrGLuint width, GrGLuint height, GrGLbitfield preserveMask);
|
||||
using GrGLEndTilingFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLbitfield preserveMask);
|
||||
|
||||
/** EGL functions */
|
||||
using GrEGLQueryStringFn = const char* GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLint name);
|
||||
using GrEGLGetCurrentDisplayFn = GrEGLDisplay GR_GL_FUNCTION_TYPE();
|
||||
|
@ -325,6 +325,10 @@ public:
|
||||
|
||||
/* EXT_window_rectangles */
|
||||
GrGLFunction<GrGLWindowRectanglesFn> fWindowRectangles;
|
||||
|
||||
/* GL_QCOM_tiled_rendering */
|
||||
GrGLFunction<GrGLStartTilingFn> fStartTiling;
|
||||
GrGLFunction<GrGLEndTilingFn> fEndTiling;
|
||||
} fFunctions;
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
|
@ -242,6 +242,11 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc
|
||||
GET_PROC_SUFFIX(DiscardFramebuffer, EXT);
|
||||
}
|
||||
|
||||
if (extensions.has("GL_QCOM_tiled_rendering")) {
|
||||
GET_PROC_SUFFIX(EndTiling, QCOM);
|
||||
GET_PROC_SUFFIX(StartTiling, QCOM);
|
||||
}
|
||||
|
||||
if (glVer >= GR_GL_VER(3,0)) {
|
||||
GET_PROC(VertexAttribDivisor);
|
||||
} else if (extensions.has("GL_EXT_instanced_arrays")) {
|
||||
|
@ -1045,6 +1045,40 @@
|
||||
#define GR_GL_INCLUSIVE 0x8f10
|
||||
#define GR_GL_EXCLUSIVE 0x8f11
|
||||
|
||||
/** GL_QCOM_tiled_rendering */
|
||||
#define GR_GL_COLOR_BUFFER_BIT0 0x00000001
|
||||
#define GR_GL_COLOR_BUFFER_BIT1 0x00000002
|
||||
#define GR_GL_COLOR_BUFFER_BIT2 0x00000004
|
||||
#define GR_GL_COLOR_BUFFER_BIT3 0x00000008
|
||||
#define GR_GL_COLOR_BUFFER_BIT4 0x00000010
|
||||
#define GR_GL_COLOR_BUFFER_BIT5 0x00000020
|
||||
#define GR_GL_COLOR_BUFFER_BIT6 0x00000040
|
||||
#define GR_GL_COLOR_BUFFER_BIT7 0x00000080
|
||||
#define GR_GL_DEPTH_BUFFER_BIT0 0x00000100
|
||||
#define GR_GL_DEPTH_BUFFER_BIT1 0x00000200
|
||||
#define GR_GL_DEPTH_BUFFER_BIT2 0x00000400
|
||||
#define GR_GL_DEPTH_BUFFER_BIT3 0x00000800
|
||||
#define GR_GL_DEPTH_BUFFER_BIT4 0x00001000
|
||||
#define GR_GL_DEPTH_BUFFER_BIT5 0x00002000
|
||||
#define GR_GL_DEPTH_BUFFER_BIT6 0x00004000
|
||||
#define GR_GL_DEPTH_BUFFER_BIT7 0x00008000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT0 0x00010000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT1 0x00020000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT2 0x00040000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT3 0x00080000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT4 0x00100000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT5 0x00200000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT6 0x00400000
|
||||
#define GR_GL_STENCIL_BUFFER_BIT7 0x00800000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT0 0x01000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT1 0x02000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT2 0x04000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT3 0x08000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT4 0x10000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT5 0x20000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT6 0x40000000
|
||||
#define GR_GL_MULTISAMPLE_BUFFER_BIT7 0x80000000
|
||||
|
||||
/* GL_ARB_sync */
|
||||
#define GR_GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
|
||||
#define GR_GL_ALREADY_SIGNALED 0x911A
|
||||
|
@ -333,6 +333,11 @@ bool GrGLInterface::validate() const {
|
||||
}
|
||||
}
|
||||
|
||||
if ((GR_IS_GR_GL_ES(fStandard) && (
|
||||
fExtensions.has("GL_QCOM_tiled_rendering")))) {
|
||||
// all functions were marked optional or test_only
|
||||
}
|
||||
|
||||
if ((GR_IS_GR_GL(fStandard) && (
|
||||
(glVer >= GR_GL_VER(3,2)) ||
|
||||
fExtensions.has("GL_ARB_instanced_arrays"))) ||
|
||||
|
@ -3,6 +3,10 @@
|
||||
// how and when to attach them (e.g. only if an extension is present).
|
||||
// It is used for both the assemble and validate step.
|
||||
//
|
||||
// To regenerate the Assemble/Validate code after editing this file, execute:
|
||||
//
|
||||
// make -C tools/gpu/gl/interface generate
|
||||
//
|
||||
// Currently it assumes the minimum versions:
|
||||
// - GL: 2.0
|
||||
// - GLES: 2.0
|
||||
@ -260,6 +264,19 @@
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"GL": null, // Not supported
|
||||
"GLES": [{"ext": "GL_QCOM_tiled_rendering"}],
|
||||
"WebGL": null,
|
||||
|
||||
"functions": [
|
||||
"StartTiling", "EndTiling",
|
||||
],
|
||||
"optional": [
|
||||
"StartTiling", "EndTiling",
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"GL": [{"min_version": [3, 2], "ext": "<core>"},
|
||||
{/* else if */ "ext": "GL_ARB_instanced_arrays"}],
|
||||
|
Loading…
Reference in New Issue
Block a user