Commit Graph

141531 Commits

Author SHA1 Message Date
Jason Ekstrand e97002ebcf anv: Add minimal boilerplate for VK_KHR_acceleration_structure
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8637>
2021-06-22 21:09:25 +00:00
Jason Ekstrand 72437f6d54 spirv: Create acceleration structure and shader record variables
spirv_to_nir now requires NIR variables to be created for everything.

Fixes: 10b3eecd36 "spirv: Don't remove variables used by resource..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8637>
2021-06-22 21:09:25 +00:00
Mike Blumenkrantz 5cecf826d3 zink: don't clear batch resources on fence finish
this eliminates the need for locking here and has no noticeable
increase in overhead, so the reduction of complexity seems worthwhile

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz b315aa43f1 zink: move some end-of-batch stuff to submit thread
no reason to do this on the driver thread when it could be async

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz d8dc03c213 zink: flag scanout updates to batch state, not resource
now that submission is serialized better, it's not actually the resource that should be
tagged for scanout sync, it's the batch state, as multiple contexts might reuse the same
resource, thus requiring synchronization on every submit

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz c1d06c402a zink: move fence reset to submit thread
try to reduce job queue latency

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 97f8249336 zink: move sparse buffer commit to screen queue
all queue submission must be serialized with the dispatch thread

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 478f129ee7 zink: move queue submit thread to screen
this needs to be a screen-based queue in order to serialize properly
with multiple contexts

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz d4159963e3 zink: enforce multi-context waiting for unflushed resources on foreign batches
this doesn't seem to be a real issue now that tc doesn't break makeCurrent
anymore, but if such a thing were to once again become a problem, at least
there will be handling for it

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz ef418cfc59 zink: make init_mem_range() a public function
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 18c22f5024 zink: break out offset alignment calculation into helper
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz d574b0a51e zink: apply zink_resource_object::offset for memory flush/invalidates
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz d80d9e1c93 zink: queue v3.0
this uses a pointer to a batch state substruct for timeline tracking,
which provides a few nice benefits:
* explicit ability to detect unflushed batches (even on other contexts)
* the context doesn't need to have a "current" timeline id
* timeline (batch) ids can be distributed during submit, not when recording begins
* an abstracted api which can be more easily changed under the hood

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 28496f6ff2 zink: remove no-longer-used resource helper functions
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 59ec1794f6 zink: use batch usage api for resource helper function
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 1226628eb6 zink: add and use fencing functions which take batch usage structs
this hides the exact mechanics of fencing based on batch usage and makes
the usage a bit more explicit

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 982a2dfbd4 zink: improve tc fence disambiguation
instead of storing separate batch_id values onto the tc fence for matching:
* use a fence pointer on the main context to indicate the current deferred fence
* add a monotonic counter to each batch state which double-increments on each use,
  thereby enabling direct determination by the tc fence as to whether this is the same
  batch state it was created with

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Mike Blumenkrantz 618784732a zink: only update last_finished during batch reset if the batch was used
0 is never a valid batch_id, so don't try to update this

minor cosmetic change

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
2021-06-22 20:57:33 +00:00
Emma Anholt 56c7e69c4d freedreno: Fix leak of the screen hash table.
Now we have no leaks detected on a run of a basic deqp test
(dEQP-GLES2.functional.shaders.constants.const_float_assignment_3_fragment).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11537>
2021-06-22 20:39:18 +00:00
Dave Airlie b76f229954 crocus/bufmgr: fix userptr left over fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11538>
2021-06-23 06:08:19 +10:00
Dave Airlie 45c12da211 croucs: limit stencil swizzle change to older generations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11538>
2021-06-23 06:08:19 +10:00
Mike Blumenkrantz 7eb3728e4b zink: clear textures directly when possible
now that overhead for resuming renderpasses has been made mostly nonexistent,
this is by far the better option and cuts cpu usage by ~90% in some cases,
e.g., tomb raider benchmark

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11430>
2021-06-22 19:37:07 +00:00
Dave Airlie a0608b3efc crocus/gen8: add support for cherryview (env var for bdw)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie c630304196 crocus/gen8: hookup gen8 state generators
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie edf05076a4 crocus/gen8: handle sampler differences
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 661f108d80 croucs/gen8: handle gfx8 surface aux addr reloc.
This is ported from i965

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 12e4da8053 crocus/gen8: port over VFE/compute state changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 612c30bff7 crocus/gen8: port over ps/wm state changes from iris.
This emits the PS extra packet as well

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 5888b71847 crocus/gen8: port over vs/gs/ds state changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 457f21aa91 crocus/gen8: add depth stencil state support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 524eae8b78 crocus/gen8: add viewport support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie d12a9eda72 crocus/gen8: add rasterizer state changes.
Port over raster packet and state changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 6613c0ac37 crocus/gen8: refactor blend state for gen8
gen8 emits these packets differently, port the i965 style

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 4025c9d340 crocus/gen8: add PS blend command support.
This adds support for new gen8 command

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 22b9063aee crocus/gen8: add VF SGVS support.
This is moved functionality on gen8

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 5b32fccd3f crocus/gen8: add SBE swiz support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 88bba6a49e crocus/gen8: add streamout support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 750e0c1ff3 crocus/gen8: add PMA fix from iris
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 786cf437db crocus/gen8: add VF topology support
this is a new command on gen8

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 961ee7e72b crocus/gen8: state base address + misc setup state.
This ports over SBA setup and some misc packets needed to
setup the context

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 515f9f5e40 crocus/gen8: add support for vertex instancing and index buffers.
This ports over the VF instancing code from iris

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie abc990df9b crocus/gen8: add raw pipe control support for gen8 workarounds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 117fdacc2b crocus/gen8: limit vertex buffer workarounds to ivb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 36fd6152f6 crocus/gen8: extending gen7 binding table pointers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 643475bad3 crocus/gen8: add l3 config support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie d0a96d6817 crocus/gen8: add sampler / border color support for gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:21 +00:00
Dave Airlie 0cec8eed70 crocus/gen8: extend predicate handling to gen8.
This adds some gen8 specific code to do MI_PREDICATE properly,
otherwise just extends the hsw code

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:20 +00:00
Dave Airlie aac830ec65 crocus: extend hsw cut index to gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:20 +00:00
Dave Airlie a422823a61 crocus/gen8: extend image support to gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:20 +00:00
Dave Airlie 60c03d003a crocus/gen8: extend some compute + state functions to gen8
This just extends some hsw functionality to gen8

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
2021-06-22 18:56:20 +00:00