Commit Graph

142057 Commits

Author SHA1 Message Date
Alyssa Rosenzweig a207c77314 agx: Lift agx_block_add_successor from Panfrost
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig 2e1ba82060 agx: Count write registers, not components
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig 0ef93554e1 agx: Mark sources that kill
Trivially computed during liveness analysis (already a byproduct!) and required
for efficient register allocation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig 7972e74f40 agx: Add liveness analysis pass
Based on the Panfrost one, scalarized and with some silly things fixed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig ec40620f86 agx: Add agx_exit_block helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig ebd25e7ee7 agx: Pull out agx_write_components
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig f49ba0874a asahi: Unify varying linking code with vertex shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig 6a657b17b9 agx: Remap fragment shader varyings explicitly
Needed to handle fragcoord.z correctly, for example. Step 1, at least.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig 32f4be5dd7 agx: Rename agx_pack to agx_pack_binary
Conflicts with GenXML.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig bf8d1734fd agx: Implement ld_vary_flat
Not clear what any of this is for but let's be nice and match the blob.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig 3eab648d6b agx: Implement nir_intrinsic_load_frag_coord
Depends on matching ABI.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig 8457524238 agx: Rename remap_varyings -> remap_varyings_vs
Want to do the same for fragment shaders.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig eabcf9f31e asahi: Identify varying descriptor fields
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig 3d3e4928b2 agx: Add ld_vary_flat opcode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig 10b8563966 agx: Update ld_vary encoding mask
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig 99b67ab355 agx: Add perspective bit to ld_var
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig ef808205c6 agx: Add agx_immediate_f helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig be4d88a6ba agx: Mark components as ASSERTED
Prevents a release build warning.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
2021-07-05 20:56:03 +00:00
Thomas H.P. Andersen 8795501cef lavapipe: remove initialization override
These are duplicates from a few lines up

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11703>
2021-07-05 19:49:32 +00:00
Thomas H.P. Andersen 349f169756 zink: remove initialization override
These are duplicates from a few lines up

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11703>
2021-07-05 19:49:32 +00:00
Bas Nieuwenhuizen 406c87b779 radv: Support address capture and replay.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10570>
2021-07-05 17:27:51 +00:00
Bas Nieuwenhuizen f9cc94af7b radv/winsys: Add support for a fixed VA address for replay.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10570>
2021-07-05 17:27:51 +00:00
Bas Nieuwenhuizen 8025b4120f radv/winsys: Return vulkan errors for buffer creation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10570>
2021-07-05 17:27:51 +00:00
Bas Nieuwenhuizen c88d1bace3 meson: Bump libdrm for amdgpu to 2.4.107.
For capture/replay va stability.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10570>
2021-07-05 17:27:51 +00:00
Danylo Piliaiev c0f623e62f glsl: Prohibit implicit conversion of mem parameter in atomicOP functions
Per OpenGL Shading Language, section 8.11. "Atomic Memory Functions"
first argument "mem" of all atomicOP functions is inout.
The same is true for ARB_shader_storage_buffer_object and
GL_INTEL_shader_atomic_float_minmax

For implicit conversion of inout parameters it is required for type
to support bi-directional conversion, since there is no such types
in glsl - implicit conversion is effectively prohibited.

Alternatively we could have marked atomic_var parameter of built-in
atomicOP functions as inout, however it opens another can of worms
during NIR lowerings.

Fixes: ea0a1f5beb
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2837
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4887>
2021-07-05 18:29:51 +03:00
Mike Blumenkrantz 5c77f99c2e zink: ci updates for wideline fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11041>
2021-07-05 14:14:40 +00:00
Mike Blumenkrantz 3292a9d660 lavapipe: wideLines support
easy enough

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11041>
2021-07-05 14:14:40 +00:00
Tomeu Vizoso 1e23004600 panvk: Add vkEvents support
Use syncobjs to implement vkEvents (as suggested by Boris).

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Tomeu Vizoso 5defffaa4d panfrost: Specify alignment for the Job Header descriptor
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Tomeu Vizoso 5997f18d8a panvk: Make panvk_queue_transfer_sync more generic
Have it accept a syncobj so it can be used in a future commit.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Tomeu Vizoso 839eeaf306 panvk: Support calls to CreateDescriptorSetLayout without bindings
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Rohan Garg bff39be64d ci: Don't artifact rendered images when job succeeds
Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11088>
2021-07-05 11:39:08 +00:00
Samuel Pitoiset 585332caf8 ci: remove few CTS that are now skipped with RADV
Some expected list of failures were actually outdated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11712>
2021-07-05 12:07:45 +02:00
Samuel Pitoiset 32e4552ca5 ci: update list of expected failures against CTS 1.2.6.2 for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11712>
2021-07-05 12:07:41 +02:00
Mike Blumenkrantz 9fbf6b2abf lavapipe: implement VK_EXT_line_rasterization
rectangular and strict lines aren't supported in this, and multisampling
must be disabled for correct line rasterization

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Mike Blumenkrantz 73ad0bcfd8 lavapipe: store the geometry shader prim type to render state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Mike Blumenkrantz fba6dafb9f lavapipe: store whether the geometry shader outputs GL_LINES
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Tomeu Vizoso 9a0e0af497 panvk: Add VkCommandPool support
Mostly just copied from turnip.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon d629debaca panvk: Support returning BOs allocated by panvk_pool to a 'free BO' pool
So all CommandBuffers in a given CommandPool can reuse BOs for their
memory pools.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Tomeu Vizoso d33a3fad64 panfrost: Fork pan_pool for Gallium and Vulkan
This commit adds the actual implementations, allowing to diverge while
still sharing code that depends on pool functionality.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon deb4074a54 panfrost: Start splitting the panfrost pool logic
The Gallium and Vulkan drivers will soon use different memory pool
implementation, but some pieces in libpanfrost depend on pan_pool. Let's
split the implementation so we have common bits still available while
letting the drivers implement what really matters: the allocation logic.

All the generic pieces are prefixed pan_pool, and what will become the
gallium implementation is prefixed panfrost_pool. We'll then duplicate
the panfrost_pool bits in panvk and prefix it with panvk_pool, and
implementations will start diverging from there.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon 4f0896ea4f panvk: Use the desc alloctor when we can
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon d873045b07 panfrost: Allocate WRITE_VALUE jobs with panfrost_pool_alloc_desc()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon 55ec3596f5 panfrost: Add alignment info to write-value and cache-flush jobs
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon dea0c4ddd8 panfrost: Pass a memory pool to pan_blit_ctx_init()
Pass a memory pool to pan_blit_ctx_init() instead of creating a new pool.
Useful for Vulkan since the descriptor pool is at the command buffer
level and is thus shared by all blit batches. Doing this will save us a
BO ownership transfer.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon 3cdbc1e8c0 panfrost: Don't add blit context BOs twice
The transient_bo has already been added to the BO list, no need to call
panfrost_batch_add_bo() a second time on the same BO.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Dave Airlie b4d87a34c7 crocus: restrict prim_restart on index buffer check to pre-hsw
This code has no use on hsw or chv

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie 6909b4a75a crocus: reorder version checks on indirect xfb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie 063d7bfa1c crocus: inline group_index<->bti
this is on a fastpath for ubo emission

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie be5bb3146a crocus: optimise bo_unref path a little.
This just splits it into the atomic/non-atomic paths

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00