Commit Graph

25607 Commits

Author SHA1 Message Date
Robert Phillips
b58098f34c Add onPrePrepareDraws & createProgramInfo methods to GrDrawVerticesOp (take 2)
This CL also incidentally adds:

1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.

2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper

Bug: skia:9455
Change-Id: I88ce51c585b1458ee79a9aaa7024190e9f19198c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274506
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-03 13:48:41 +00:00
Mike Reed
a2cf8ae420 switch to virtual with no bones
Bug: skia:9984
Change-Id: I89d8f5f227690c71be875b5a7718aba0ad058650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274504
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-03-03 13:35:00 +00:00
Herb Derby
73ae40a424 Search for Strike at head of LRU first
Switch to checking the head of the linked list for the LRU before searching
the hash table.

Change-Id: If28f4759ef609dde11778db8ba91cc9dfdd6a259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274399
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-03-03 03:50:19 +00:00
Mike Klein
8121d27b29 stick to 256-bit ymm on skx
I haven't yet seen it slower, and it ought to avoid the most egregious
downclocking from zmm use.  Still gets to use all the fancy AVX-512 new
instructions, so it does seem to run faster than just targeting AVX2.

Change-Id: I5738bc28c490619e0303813d69e00c8b6d7bb184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274592
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-03 00:32:51 +00:00
Mike Klein
15902a5b55 allow FMA discovery
Change-Id: Iea9c4892c27fd233c04ca441c7cc4fa6cf110dd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274656
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-02 23:17:50 +00:00
Stephen White
e7612f4d83 Dawn: increase maximum texture size in caps to 8192.
There are plans in WebGPU for queries for device/adapter limits, but
they haven't been implemented yet. In the meantime, 8K is a reasonable
minimum (e.g., it's the D3D10 minimum, and WebGPU will require D3D12).

Change-Id: Ib948411ec1083e1eedd478c0981b5e86ef5160cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274552
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-02 23:08:09 +00:00
Brian Salomon
71fe945da3 Prevent unbounded listener growth on SkPixelRefs.
Use SkIDChangeListener and update GrBitmapTextureMaker to add listener
to key to deregister if texture is purged before genID changes.

Add a common listener list implementation and replace existing lists.

Change-Id: Ib0c78241eaf59b59b892d8b004b2bb095140bc6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274549
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-02 22:32:09 +00:00
Mike Klein
89c995c196 hoist1
Add scalar hoisting too.  Nothing tricky.

Scalar loop is now good like the vector one:

    0x1065c7160: movl   %eax, (%rdx)
    0x1065c7162: decl   %edi
    0x1065c7164: addq   $0x4, %rdx
    0x1065c7168: testl  %edi, %edi
    0x1065c716a: jg     0x1065c7160

Change-Id: I9352e85bcae8d6be0d9092b2664841fde2c3c7d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274587
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-02 22:25:19 +00:00
Mike Klein
6a63365fee auto-detect MCPU
Change-Id: Id38c51704c99810b2237d18c18163d9d776451bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274588
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-02 22:21:49 +00:00
Mike Klein
5a879c47e2 basic hoisting
We've got this can_hoist analysis... why not use it?
I need to do some pen and paper work before I can do
this for the scalar loop, so that's TODO.

The tight part of a memset-from-uniforms loop becomes

    0x1065c70e0: vmovdqu64 %zmm0, (%rdx)
    0x1065c70e6: addl   $-0x10, %edi
    0x1065c70e9: addq   $0x40, %rdx
    0x1065c70ed: cmpl   $0xf, %edi
    0x1065c70f0: jg     0x1065c70e0

Change-Id: Iad8ee018ae65ee9f370980939a70f042ee3f9138
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274586
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-02 21:58:29 +00:00
Robert Phillips
b43cfa4d3f Revert "Add onPrePrepareDraws & createProgramInfo methods to GrDrawVerticesOp"
This reverts commit d3606518fa.

Reason for revert: DDL3 bots are red

Original change's description:
> Add onPrePrepareDraws & createProgramInfo methods to GrDrawVerticesOp
> 
> This CL also incidentally adds:
> 
> 1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.
> 
> 2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper
> 
> Bug: skia:9455
> Change-Id: Iecd712d3ac76038651bd2e0512134e310930d527
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274551
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I6e44ba3bc47df27479af9344af946e27f0a2e937
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274505
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-02 20:50:54 +00:00
Mike Klein
8248ba64f2 noalias for params, inbounds for GEPs
These don't get us to be able to hoist uniforms yet,
but I think they're required.  Tests still pass.

The nullptrs in the CreateGEP calls were implied by
the old special cases we were calling before.  They
mean, pick up the type from the pointer argument.

Change-Id: Idd2b5c4b782229ebf2640f87e0ed6ebb63809042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274583
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-02 20:34:09 +00:00
Mike Reed
5caf9358c3 remove bones from SkVertices
Bug: skia:9984
Change-Id: I7c4f33ee82087eb1b0a60243183f0c68e310f10d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274547
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-03-02 20:30:59 +00:00
Robert Phillips
d3606518fa Add onPrePrepareDraws & createProgramInfo methods to GrDrawVerticesOp
This CL also incidentally adds:

1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.

2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper

Bug: skia:9455
Change-Id: Iecd712d3ac76038651bd2e0512134e310930d527
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274551
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-02 20:26:10 +00:00
Jim Van Verth
37f84c05db Fill in most D3DCaps texture property queries.
Not sure about read/write pixels at this point, so left those as stubs.
Also commented out sections that apply to YCbCr formats, which will
be added later.

Bug: skia:9935
Change-Id: I715b5a2a894af9a4fbbfcd89a6eab284913293dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273608
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-02 20:19:11 +00:00
Chris Dalton
ded437003d Add a bindBuffers() call to GrOpsRenderPass
Adds a bindBuffers() call and removes the GrBuffer arguments from the
draw calls.

Change-Id: I43c2dd8afe80c41e48c1d9d5210affcfe6f095fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273840
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-02 19:13:19 +00:00
Leon Scroggins III
9eb7874844 SkJpegCodec: Gracefully handle malloc failure
Bug: b/150353577

If malloc fails, don't let SkJpegCodec attempt to decode into it.
Return kInternalError, which is what we return for OOM.

Change-Id: I6750e907c5e649d9e12ba75e84c8d9e91a66dd61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273809
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-02 18:40:49 +00:00
Brian Salomon
99a813ca29 Avoid unbounded listener growth on SkImage_Lazy when textures are purged
Generalizes the system used on SkPathRef where a GrTexture's key
destructor signals that a listener on the image can be removed via
the unique key custom data.

Removes texturesAreCacheable() from SkImageGenerator. This was used to
prevent unbounded growth in a narrow situation related to
GrBackendTextureImageGenerator.


Change-Id: I3c605da099acfac94751e793331e356a0979d359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274038
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-02 18:38:09 +00:00
Chris Dalton
d42d2001ac Reland "Move setupGeometry() from GrGLGpu to GrGLOpsRenderPass"
This is a reland of b67081f9cb

Original change's description:
> Move setupGeometry() from GrGLGpu to GrGLOpsRenderPass
> 
> Change-Id: I8788b96e07216be738c0ce1babb810b05bf46694
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273696
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: Ic30c9e1b1d9a3ae29623ff8239b9b1d7b2dad273
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274057
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-02 17:31:39 +00:00
Robert Phillips
ac6156cf23 Standardize behavior of ops that implement onPrePrepare
Each such op now has a base createProgramInfo method along with a helper version that just takes a flushState.

This CL also makes GrSimpleMeshDrawOpHelper::CreateProgramInfo a chokepoint for programInfo allocation.

Bug: skia:9455
Change-Id: Ibbf0e9cd6f24453e1b87a5e072a30248811a1237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274054
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-02 15:55:32 +00:00
Brian Salomon
777e146564 Remove domain-uses-decal code from GrTextureProducer
Instead pass wrap modes to createFragmentProcessor.

Rename GrTextureProducer::hasMixedResolutions() to
isPlanar() and use to determine whether to attempt
simple texture draw (that would flatten).


Change-Id: Ifca833a1ab02a98e4e24718bd8542e0ac48a4c74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274276
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-02 15:03:52 +00:00
Mike Reed
5a109c7c9b Do we still need bones on vertices for canvas
Bug: skia:9984
Change-Id: I11669df7a8ebaf4b1af3f6908bfd1bafaa74d0b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274280
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-02 14:47:32 +00:00
Brian Salomon
d6205322cd SkImage_Lazy::lockTextureProxyView computes its own key
Remove unused key from GrYUVAImageTextureMaker.

Remove outdated comment about width/height for image/bitmap key.

Change-Id: I76efd61725a0c63c058cdf480295f49dcfeab0fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274238
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-02 01:19:01 +00:00
Brian Salomon
231f1bf565 Restore filtering to clipImage in SkGpuDevice::drawSpecial
Reverts a change made in:
https://skia-review.googlesource.com/c/skia/+/274205

Change-Id: I979f3ee3e43eba310bcffb9f0be9e532cb20a46d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-01 21:27:01 +00:00
Brian Salomon
ecbb0fb2d5 Simplify view getters on GrTextureProducer.
The only thing that affects the view returned is whether it ought to
be MIP mapped or not. So don't take a whole GrSamplerState.

The view() function won't ever change the colortype so just query
GrTextureProducer rather than having view() return a tuple.

The rest is transitively reaching through callers and callees of
GrTextureProducer::view() to only pass filter or GrMipMapped instead of
GrSamplerState. Also, some params that indicate whether MIPs are
requested are changed from bool to GrMipMapped. And some minor style
stuff (mainly de-yoda-ifying GrMipMapped checks, using
GrSurfaceProxyView operator bool()).

Change-Id: Ia184aa793cf51d42642ea3bb0521ce06da2efb10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-01 00:32:04 +00:00
Mike Klein
c2b6769ab2 leak llvmcontexts for now
Being thread_local, these destruct in an awkward order
with the other major thread_locals, the SkVMBlitter Program caches.

So, just leak them for now.

Change-Id: Ia45f65eba0a301e2a047458610d5fa3110dff006
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274220
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-28 21:59:46 +00:00
Herb Derby
c02a41f0e6 SkVM implement min max
Change-Id: I225e8f7395e58a4ca3c1c151d8711796e6a56939
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274185
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-28 21:26:15 +00:00
Mike Klein
ae6443e688 bytes!
What a complicated beast!
Zeros come from the second synthetic zero arg.

Have not looked to see that these turn into shuffles,
but I will soon.

dm -m SkVM now passes all tests with SKVM_LLVM defined!

Change-Id: I46d24fad66bb9863ebfe765dbeeef8cede8e5a3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274192
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-28 21:20:26 +00:00
Mike Klein
5a8404c93e sqrt
- test sqrt
  - impl. sqrt for llvm

Change-Id: I38a06ee57bf4d50e7d068321ab765ede3d1d73bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274183
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 20:55:06 +00:00
Mike Klein
14548b94c3 index
- test index
  - impl. index in llvm
  - convert to loop counter from uint64_t -> int32_t
    to match how we use it in other backends

Change-Id: Iee371d67eddaace068906b861292eb5ed3d74c95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274135
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 20:33:57 +00:00
Mike Klein
e96207a9e3 i16x2 ops
SE(val) -> S(dst_type, val) to make this work.

Change-Id: Icf42f706b2e7761db8ce83f1e1ef95c288bfecf4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274120
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 20:03:46 +00:00
Mike Klein
7a0a117f5a bit_clear, pack, round, and a TODO for assert
Change-Id: I6288f5abe7468bde7b2713e9c9709879b883742f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274085
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 19:38:36 +00:00
Mike Klein
fe6fa7ebb8 allow fmas
Conveniently, the fmuladd intrinsic decays to mul->add on
machines that don't support fmas, not to some call out to
a complicated library implementation.  Just what we want!

Change-Id: I6828a4e38ecd7f0595050f30784cd0ec8b03eb7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274083
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 19:37:46 +00:00
Mike Klein
22c007da34 select + stores
This is enough for another swath of tests.

Change-Id: Ida43fa2ee2ebd8e6086923fb9fafef8f646d0a93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274074
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2020-02-28 19:32:42 +00:00
Robert Phillips
ce97857f5b Add GrSimpleMeshDrawOpHelper::CreateProgramInfo
This helper method can be used by the MeshDrawOps to (pre-)create their GrProgramInfos.

Bug: skia:9455
Change-Id: I41b7c2aefc0f633a1d32996c7f0cce3d11f8fcb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273815
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-28 19:26:56 +00:00
Brian Salomon
b62cee315e Simplifications to GrTextureProducers
Move all MIP map code directly into GrTextureAdjust, not used by makers.

Make GrTextureAdjuster final.

Make some virtuals private

Change-Id: I12dc7d8fa015dc85aaca3f7d5e58e094bb859518
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274045
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-28 19:23:26 +00:00
Greg Daniel
c52968170d Fix CompatibleCoverageAsAlpha flag when reducing src-over to src.
Change-Id: I087ff64e0f23aee15ac2bf7b9d3c450e28400cef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274036
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-28 18:45:15 +00:00
Herb Derby
1a0d00b879 Generate the correct instruction for neq_f32.
Check that all the f32 comparisons are correct:
vcmpeqps        %ymm0, %ymm11, %ymm12
vcmpneqps       %ymm1, %ymm11, %ymm13
vcmpltps        %ymm3, %ymm11, %ymm13
vcmpleps        %ymm5, %ymm11, %ymm14

Change-Id: I88ca45e3d58e04b95225a0d6d854dc5244f618d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274077
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-02-28 18:23:47 +00:00
Mike Klein
bfd2332045 fix bitcode
looks like the API accepts these implicit bit casts
but the bitcode does not

Change-Id: Ia93bbc13c3c37e8955def7abac5aba5b5e2ead61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274069
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 17:33:23 +00:00
Mike Klein
d7af3195b0 fill out loads, uniforms, and gathers
Everything follows a pattern based on a varying type,
so I've introduced a temporary type variable `t` to
represent that, with each variant setting `t` then
falling through to a common impl.

Change-Id: I2349308066d16ad4f497112570b666fc1dd14976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-28 17:24:27 +00:00
Mike Klein
856282a44e initialize once
seems to fix the deadlocks?

Change-Id: Iac8b4247d2521250f18f54562d5696a566a6e71a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274028
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2020-02-28 17:18:57 +00:00
Herb Derby
5c5bd1a637 Add comparisons (eq|neq|gt|gte)(i32|f32)
Change-Id: Ic53758162507d769548953001bd761e84d717322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274064
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-28 17:17:45 +00:00
Herb Derby
7430a9a1d8 Add shl_i32, srs_i32, and shr_i32 ops
Change-Id: I28e3fb933f65e38997bf4afe8bdc970e0aad2a6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274030
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-28 16:55:07 +00:00
Brian Salomon
f539130d9e Remove code from GrTextureMaker that tries to make a MIP map copy.
All subclasses implement "willBeMipped" param to
refOriginalTextureProxyView()

Change-Id: I85a5540857255bdb6f79b536979f938d94a9591a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273990
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-28 16:36:01 +00:00
Mike Klein
2ea588fe99 add mad, to_f32, trunc
enough for SkVM_mad, SkVM_madder

Change-Id: Id5165e221ae9923f6ccffc6a987d973c7f11332c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274026
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-28 16:27:41 +00:00
Mike Klein
96380c2df4 simplifications
No real change, just exploring APIs to make our code terse.

Refactors I32/F32 to be the types we should use in emit(),
rather than always the vector types.  There were quite a
few (scalar ? i32 : I32) that this folds over.

Change-Id: I26e7b297d86f98dc056402c3108e2ea8e0f29667
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273974
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-28 15:43:15 +00:00
Robert Phillips
fad1e0f47b Rename 'dstView' to 'outputView' to avoid confusion w/ 'dstProxyView'
This is just a simple clean up from a CL request.

Change-Id: Ibc09e19aeb8a160e4e4e03573fcf56cb1d58525b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273983
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-28 15:38:20 +00:00
Chris Dalton
20e7a53cd2 Revert "Move setupGeometry() from GrGLGpu to GrGLOpsRenderPass"
This reverts commit b67081f9cb.

Reason for revert: Crash in glDeleteProgram on ES2

Original change's description:
> Move setupGeometry() from GrGLGpu to GrGLOpsRenderPass
> 
> Change-Id: I8788b96e07216be738c0ce1babb810b05bf46694
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273696
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Ibd1ae7c01ac8ac6ade94f6d542a6b711f53e7fb6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274021
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-28 15:38:10 +00:00
Robert Phillips
55f681faf3 Splitup GrSimpleMeshDrawOpHelper.h
Change-Id: Ie3d05053633176ba27e55cc2de61eeba1e9f45d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273981
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-28 15:04:02 +00:00
Jim Van Verth
888ba8b3da Initialize D3D format table.
Set up the expected formats we'll want.
Doesn't include YUV formats just yet.

Bug: skia:9935
Change-Id: I934a7ef006b5a218a5f637774aea5f082202cd3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273877
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-28 15:01:31 +00:00