Commit Graph

36 Commits

Author SHA1 Message Date
Chris Dalton
5846ff3c7a Make glDraw*BaseInstance non-optional when extension(s) are present
TBR=michaelludwig@google.com

Change-Id: Ie9fc5eb6aee8cffde5d17a01fc816a1c49d02e9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281881
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-07 04:02:07 +00:00
Chris Dalton
afbf2aa737 Revert "Reland "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""""
This reverts commit 0a51aa55f8.

Reason for revert: chrome

Original change's description:
> Reland "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
> 
> This is a reland of 47d03f6ee5
> 
> Original change's description:
> > Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> > 
> > This is a reland of d84b691950
> > 
> > Original change's description:
> > > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > > 
> > > This is a reland of e8c963d474
> > > 
> > > Original change's description:
> > > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > > 
> > > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > 
> > > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> 
> Change-Id: Id9e3aacaa7c693bef74454aeccbebf367c047fd3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281632
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I227b4f0ec8704bd62f22965ff75aeb337786dbdc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281870
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-06 22:27:42 +00:00
Chris Dalton
0a51aa55f8 Reland "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
This is a reland of 47d03f6ee5

Original change's description:
> Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> 
> This is a reland of d84b691950
> 
> Original change's description:
> > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > 
> > This is a reland of e8c963d474
> > 
> > Original change's description:
> > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > 
> > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: Id9e3aacaa7c693bef74454aeccbebf367c047fd3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281632
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-06 18:43:10 +00:00
Chris Dalton
bddf60b423 Revert "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
This reverts commit 47d03f6ee5.

Reason for revert: Chrome GL interface not setting up properly

Original change's description:
> Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> 
> This is a reland of d84b691950
> 
> Original change's description:
> > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > 
> > This is a reland of e8c963d474
> > 
> > Original change's description:
> > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > 
> > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I7df1d60d5b33c84179dbe5391b49a84413cc9ec2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281570
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 18:28:54 +00:00
Chris Dalton
47d03f6ee5 Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
This is a reland of d84b691950

Original change's description:
> Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> 
> This is a reland of e8c963d474
> 
> Original change's description:
> > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > 
> > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-02 20:48:31 +00:00
Michael Ludwig
b14b144458 Revert "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
This reverts commit d84b691950.

Reason for revert: seems like chrome's glInterface is maybe not setup correctly. Crashing on intel gpu chrome bots: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8884195221041295328/+/steps/trace_test_on__intel-hd-630-ubuntu-stable__GPU_on_Linux__retry_shards_with_patch__on_linux-intel-stable/0/stdout

snippet: 
Crash reason:  SIGABRT
Crash address: 0x3e8000050b0
Process uptime: not available

Thread 0 (crashed)
 0  libc.so.6 + 0x43ed7
    rax = 0x0000000000000000   rdx = 0x0000000000000000
    rcx = 0x00007ff964c3ced7   rbx = 0x00002cc73685ddc0
    rsi = 0x00007fffb9128960   rdi = 0x0000000000000002
    rbp = 0x00007fffb9128bb0   rsp = 0x00007fffb9128960
     r8 = 0x0000000000000000    r9 = 0x00007fffb9128960
    r10 = 0x0000000000000008   r11 = 0x0000000000000246
    r12 = 0x0000000000000048   r13 = 0x0000000000000000
    r14 = 0x000000000000006c   r15 = 0x0000000000000000
    rip = 0x00007ff964c3ced7
    Found by: given as instruction pointer in context
 1  chrome!GrGLGpu::drawElementsInstancedBaseVertexBaseInstance(GrPrimitiveType, int, unsigned int, void const*, int, int, unsigned int)::$_81::operator()() const + 0x33
    rbp = 0x00007fffb9128bc0   rsp = 0x00007fffb9128bc0
    rip = 0x000055c5c1db6923
    Found by: previous frame's frame pointer
 2  chrome!drawElementsInstancedBaseVertexBaseInstance [GrGLGpu.cpp : 2306 + 0x5]
    rbp = 0x00007fffb9128c10   rsp = 0x00007fffb9128bd0
    rip = 0x000055c5c1db68b6
    Found by: call frame info
 3  chrome!onDrawIndexed [GrGLOpsRenderPass.cpp : 144 + 0x16]

Original change's description:
> Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> 
> This is a reland of e8c963d474
> 
> Original change's description:
> > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > 
> > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I1d2617f077676b6f36bb723615d527e4aa4b3efe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281057
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-04-01 21:55:43 +00:00
Chris Dalton
d84b691950 Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
This is a reland of e8c963d474

Original change's description:
> Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> 
> Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-04-01 18:41:53 +00:00
Michael Ludwig
7800453ed2 Revert "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
This reverts commit e8c963d474.

Reason for revert: assert failures: https://logs.chromium.org/logs/skia/4b4b7fcb2ff3fe11/+/steps/dm/0/stdout

Original change's description:
> Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> 
> Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: Ic760a56ca9d112e924baf7e833adb09b371928b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280817
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-03-31 22:34:17 +00:00
Chris Dalton
e8c963d474 Use glDraw.*BaseInstance calls to avoid deferred buffer binding
Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-31 21:09:57 +00:00
Chris Dalton
80f865fa6d Use GL_ANGLE_base_vertex_base_instance
Adds the ANGLE extension to our list of options for
glDraw*BaseInstance.

Removes glDrawElementsInstancedBaseInstance since this method is not
supported by the ANGLE extension.

Change-Id: Ifd25324feeaad55a4d141b5064bcd8e059948ef7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280388
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-30 17:59:05 +00:00
Chris Dalton
ccbf54ad50 Add glDraw*BaseInstance functions to GrGLInterface
Change-Id: I3f36fc0bdbc1d25e3da0e29be215a19acba6ed0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279407
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-26 18:12:29 +00:00
Mike Klein
a9609ea8c5 turn on -Wreturn-std-move-in-c++11
This CL has a complicated back story, but it's concrete change is
simple, just turning the warning on and converting a bunch of

    return foo;

to

    return std::move(foo);

These changes are exclusively in places where RVO and NRVO do not apply,
so it should not conflict with warnings like -Wpessimizing-move.

Since C++11, when you return a named local and its type doesn't match
the declared return type exactly, there's an implicit std::move()
wrapped around the value (what I'm making explicit here) so the move
constructor gets an opportunity to take precedence over the copy
constructor.  You can read about this implicit move here under the
section "automatic move from local variables and parameters":
https://en.cppreference.com/w/cpp/language/return#Notes.

This situation comes up for us with smart pointers: a function declares
its return type as std::unique_ptr<Base> or sk_sp<Base>, and we return a
std::unique_ptr<Impl> or sk_sp<Impl>.  Those types don't match exactly,
so RVO and NRVO don't come into play.  They've always been going through
move constructors, and that's not changed here, just made explicit.

There was apparently once a bug in the C++11 standard and compilers
implementing that which made these copy instead of move, and then this
sort of code would do a little unnecessary ref/unref dance for sk_sp,
and would entirely fail to compile for uncopyable std::unique_ptr.
These explicit moves ostensibly will make our code more compatible with
those older compilers.

That compatibility alone is, I think, a terrible reason to land this CL.
Like, actively bad.  But... to balance that out, I think the explicit
std::move()s here actually help remind us that RVO/NRVO are not in play,
and remind us we're going to call the move constructor.  So that C++11
standard bug becomes kind of useful for us, in that Clang added this
warning to catch it, and its fix improves readability.

So really read this all as, "warn about implicit std::move() on return".
In the end I think it's just about readability.  I don't really hold any
hope out that we'll become compatible with those older compilers.

Bug: skia:9909
Change-Id: Id596e9261188b6f10e759906af6c95fe303f6ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-18 23:55:35 +00:00
Brian Salomon
8675bcbaf9 Add support for GL_NV_fence.
Will be used for YUV420 readback on ANGLE ES 2 contexts in Chrome.

Marks the functions as required as Chrome now adds inits these on
GrGLInterface.

Bug: 1040643
Change-Id: I5504d4c9209874991592c9f86aaf7987c316aa40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265602
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-01-24 01:53:33 +00:00
Brian Salomon
87c314210a Add functions for GL_NV_fence to GrGLInterface.
Also add macro for ALL_COMPLETED

We plan to use this with ANGLE ES2 contexts.

Change-Id: I6c967fa9b9aefc41c31cd806aece8533f846f940
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265756
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-22 16:02:45 +00:00
Chris Dalton
0a1923e507 Disable QCOM_tiled_rendering while we wait for test devices
There are devices that advertise this extension but don't actually
provide the GL entrypoints. This is causing live crashes.

Bug: flutter:47164
Bug: flutter:47804
Change-Id: Idded47e8dbd4462463ad91a62b06b0df3245f0c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263809
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-11 06:04:56 +00:00
Chris Dalton
e1196c5d01 Add a mechanism to insert framebuffer barriers for NVIDIA tessellation
Bug: skia:9739
Change-Id: I4f13110c30af796edded1d0e18860bcb4a6ef925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261673
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-31 00:18:36 +00:00
Chris Dalton
5a2f962313 Add back door support for GLSL tessellation shaders
Implements tessellation support at the Ganesh level, and adds back
door methods for supplying raw GLSL strings directly to the OpenGL
driver. Adds a new gm to verify tessellation is works in GL.

Change-Id: Idfc285b955cbe5e8e6bf0475be8b518b0cc6ed2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261196
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-27 22:34:10 +00:00
Hal Canary
c99a4df86e WebGL2: Add BlitFramebuffer, ShaderDerivativeSupport
fix from paraboul@

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit

Bug: skia:9052
Change-Id: If0c408f33f4bb6cd47513a2c1f3a1e3ac3da3320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249228
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-17 20:05:39 +00:00
Hal Canary
e054d3cf3d CanvasKit: Switch to WebGL 2.0
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit

Bug: skia:9052
Change-Id: I444031276aea90d82f289b16ba6cd36de5192abd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248927
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-16 18:45:46 +00:00
Chris Dalton
b50cc81a3c Reland "Use GL_QCOM_TILED_RENDERING to explicitly discard stencil"
This is a reland of 7e6d3b00ad

Original change's description:
> Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
> 
> Bug: skia:
> Change-Id: I7a6234f6a9955dbda83ab2d8fc6930fe680e102b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245529
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:
Change-Id: Ifb2ac1a595be0ca55d75d53d85bf76f7d98e1c15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246282
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-10-15 19:23:48 +00:00
Chris Dalton
38f0a4972a 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>
2019-10-07 18:42:01 +00:00
Brian Salomon
768f900a88 Revert "Use GL_QCOM_TILED_RENDERING to explicitly discard stencil"
This reverts commit 7e6d3b00ad.

Reason for revert: Breaks chrome, need to stage new GL function requirment. Example failure:

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8900671758208001488/+/steps/vr_pixeltests_on_Android_device_Nexus_5__with_patch_/0/stdout


Original change's description:
> Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
> 
> Bug: skia:
> Change-Id: I7a6234f6a9955dbda83ab2d8fc6930fe680e102b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245529
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com

Change-Id: I3f059d4232ef664cf2eb2c5122e55c2c291e45b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245876
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-03 01:32:28 +00:00
Chris Dalton
7e6d3b00ad Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
Bug: skia:
Change-Id: I7a6234f6a9955dbda83ab2d8fc6930fe680e102b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245529
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-02 16:36:08 +00:00
Brian Salomon
9c73e3df83 Turn off -Wreturn-std-move-in-c++11
Change-Id: I127c979670c3dc7dac2e35908a795afbdefca8f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234902
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-15 17:45:58 +00:00
Brian Osman
064729e439 Implement program binary caching in ES2 (with GL_OES_get_program_binary)
Change-Id: I6f9ee51f7c063ca03bf48fccd413dae244edd191
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 23:49:11 +00:00
Brian Salomon
fc1dddbb8d Reland "Get EGLimage functions out of GrGLInterface."
This reverts commit 753836fcad.

Reason for revert: fixed

Original change's description:
> Revert "Get EGLimage functions out of GrGLInterface."
>
> This reverts commit bc233135e4.
>
> Reason for revert:
> EGLImageTest and TextureBindingTest broken on Windows ANGLE
> Build failures on Debian9, unable to link
>   ld.lld: error: undefined symbol: eglCreateImageKHR
>
> Original change's description:
> > Get EGLimage functions out of GrGLInterface.
> >
> > Only used in test code which can just directly call these.
> >
> > Also removed related code in interface assemble/validate generator.
> >
> > Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I622fadf22c5d79f5b1d335a8a81455978d49a86a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213960
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com

EXTRA_TRYBOTS=Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE

Change-Id: I71397072fa79ae3c72f3835c5e991b9ef2465a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-15 19:58:45 +00:00
Michael Ludwig
753836fcad Revert "Get EGLimage functions out of GrGLInterface."
This reverts commit bc233135e4.

Reason for revert:
EGLImageTest and TextureBindingTest broken on Windows ANGLE
Build failures on Debian9, unable to link
  ld.lld: error: undefined symbol: eglCreateImageKHR

Original change's description:
> Get EGLimage functions out of GrGLInterface.
>
> Only used in test code which can just directly call these.
>
> Also removed related code in interface assemble/validate generator.
>
> Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I622fadf22c5d79f5b1d335a8a81455978d49a86a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213960
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-05-15 17:45:48 +00:00
Brian Salomon
bc233135e4 Get EGLimage functions out of GrGLInterface.
Only used in test code which can just directly call these.

Also removed related code in interface assemble/validate generator.

Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-15 16:29:18 +00:00
Brian Osman
a9aaef0c99 Revert "Support GL_EXT_draw_buffers"
This reverts commit 77af4ecd35.

Reason for revert: iOS errors and bad images on Gold

Original change's description:
> Support GL_EXT_draw_buffers
> 
> Change-Id: I078aa7c42de4368602b0ef43bd7e18efbfd1e049
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212182
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: Ib8759d4a1009f9a8774365a699e211834d634cff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212264
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-06 20:07:27 +00:00
Brian Osman
77af4ecd35 Support GL_EXT_draw_buffers
Change-Id: I078aa7c42de4368602b0ef43bd7e18efbfd1e049
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212182
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-06 18:59:06 +00:00
Mike Klein
fb80e52c73 update GL interface codegen
Tested by:
    cd tools/gpu/gl/interface/
    go run *.go --in_table "./interface.json5" -out_dir "../../../../src/gpu/gl/"

Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-CheckGeneratedFiles
Change-Id: I1fee1263e321580c0e8c4e41d345fc856ef2a4e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210128
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-04-24 18:01:07 +00:00
Kevin Lubick
3902628e35 Support WebGL 1.0 with caps
There is some logic in here for 2.0 as well, just as a
"as long as I was looking at the specs", but only 1.0
is really supported.

This seems to resolve the bug where some GPUs weren't
advertising correctly that they had vertex array object
support, by checking for both extension names (with and
without "GL_" prefix)

Of note, this saves about 18 Kb (5.5 Kb gzipped) of code size
by compiling out the unneeded GLES checks/functionality.

Bug: skia:8378
Change-Id: I773bf4dbf231b991051d2a9f640b8047a9010e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203461
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-28 17:21:23 +00:00
Kevin Lubick
9928c7db92 Add test_only option to gen_interface
Change-Id: I984e392709fb50037c0ad26135904a410aaf3235
Bug: skia:8912
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204443
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-03-28 16:22:13 +00:00
Kevin Lubick
5509dac4cc Reland "Generate GrGLInterface and GrGlAssembleInterface* from table"
This reverts commit 573cb87a07.

Reason for revert: Marking failing validation as optional and filing bug for follow up in Chrome.

Original change's description:
> Revert "Generate GrGLInterface and GrGlAssembleInterface* from table"
> 
> This reverts commit 93b3dce89d.
> 
> Revert "Delete old assembleInterface code"
> 
> This reverts commit 7b1cf20d47.
> 
> Revert "Delete in favor of autogenerated file"
> 
> This reverts commit 0223bd01d8.
> 
> Bug: skia:8474
> NOTRY:true
> Change-Id: I23a904347f9d6cefd1710a2de056c39d52f4b178
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203463
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>

TBR=kjlubick@google.com,stani@google.com

Change-Id: I85adb302eb093fe9b7a4ec2c984323c191278a43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8474
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203177
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-03-26 10:55:00 +00:00
Kevin Lubick
573cb87a07 Revert "Generate GrGLInterface and GrGlAssembleInterface* from table"
This reverts commit 93b3dce89d.

Revert "Delete old assembleInterface code"

This reverts commit 7b1cf20d47.

Revert "Delete in favor of autogenerated file"

This reverts commit 0223bd01d8.

Bug: skia:8474
NOTRY:true
Change-Id: I23a904347f9d6cefd1710a2de056c39d52f4b178
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203463
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2019-03-25 19:03:29 +00:00
Kevin Lubick
93b3dce89d Generate GrGLInterface and GrGlAssembleInterface* from table
This CL creates a go program that takes a JSON file of
GPU functions and creates the assemble and validate code
based on that.

This approach will hopefully will lessen the need for
"shotgun surgery" anytime a new function/extensions is added.

Additionally, it should be easier to add a new standard
(concretely, WebGL) using this technique.

There are a few potential bugs/mismatches in the current
implementation that this has identified, for example,
Requiring GL 3.x for adding a feature, but only verifying
it is there on GL 4.x - I did not attempt to correct these
bugs in the old version, as we will hopefully be able to delete
that version and use the generated files.

Bug: skia:8474, skia:8378
Change-Id: Ie8144bbab8e03f2c815fd942fa9f7f91dedba101
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202137
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-25 15:03:48 +00:00