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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>