Dave Airlie [Mon, 21 Jun 2021 07:35:06 +0000 (17:35 +1000)]
crocus/gen8: add raw pipe control support for gen8 workarounds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:32:27 +0000 (17:32 +1000)]
crocus/gen8: limit vertex buffer workarounds to ivb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:29:39 +0000 (17:29 +1000)]
crocus/gen8: extending gen7 binding table pointers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:29:09 +0000 (17:29 +1000)]
crocus/gen8: add l3 config support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:25:55 +0000 (17:25 +1000)]
crocus/gen8: add sampler / border color support for gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:24:08 +0000 (17:24 +1000)]
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>
Dave Airlie [Mon, 21 Jun 2021 07:19:42 +0000 (17:19 +1000)]
crocus: extend hsw cut index to gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:06:08 +0000 (17:06 +1000)]
crocus/gen8: extend image support to gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:00:37 +0000 (17:00 +1000)]
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>
Dave Airlie [Mon, 21 Jun 2021 06:57:48 +0000 (16:57 +1000)]
crocus/gen8: add push constant support (extend hsw)
This just extends the gen7 checks and adds the gen8 value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:53:42 +0000 (16:53 +1000)]
crocus: extend l3 config setup to gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:52:39 +0000 (16:52 +1000)]
crocus/query: add gen8 support to queries by extending hsw checks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:52:21 +0000 (16:52 +1000)]
crocus/stencil: limit stencil workaround to gen7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:47:23 +0000 (16:47 +1000)]
crocus: limit texture gather workarounds to gen7/hsw
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:47:05 +0000 (16:47 +1000)]
crocus/gen8: limit some pipe controls to gen7/hsw
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:31:51 +0000 (16:31 +1000)]
crocus: refactor blend state code.
This just refactors this code before adding gen8 support which
needs more changes in this area.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:24:17 +0000 (16:24 +1000)]
crocus: convert a bunch of is_haswell into verx10 checks.
This just make things easier when gen8 support is added
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 05:31:06 +0000 (15:31 +1000)]
crocus: fixup workaround_bo to match 965.
Always add to the batch, and don't set the reloc write flag when
adding to reloc list, as this will confuse the render/compute sync
code and cause over syncing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:10:38 +0000 (16:10 +1000)]
crocus: rename genX proto functions to avoid iris conflicts.
If we start adding gen8, then conflicts occur, but the crocus
ones into their own namespace to avoid this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 07:17:02 +0000 (17:17 +1000)]
crocus: fixup stray tab
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Dave Airlie [Mon, 21 Jun 2021 06:06:23 +0000 (16:06 +1000)]
crocus: drop dead gen prototypes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
Emma Anholt [Mon, 21 Jun 2021 20:26:23 +0000 (13:26 -0700)]
i915g: Clear xfails for vertex texturing.
Fixes:
7378c6479278 ("i915: Disable vertex texturing and delete the code.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Emma Anholt [Mon, 21 Jun 2021 16:28:59 +0000 (09:28 -0700)]
i915g: Use the color swizzle to reshuffle the blend const color.
If we're remapping RGBA from the shader into dst channels, we also need to
remap the blend constant color. The previous static mapping only worked
for ARGB cbufs, but we get ABGR in surfaceless deqp.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Emma Anholt [Tue, 22 Jun 2021 17:05:07 +0000 (10:05 -0700)]
i915g: Simplify color write mask setup.
Use the surface's precomputed swizzle instead of doing a local format
table.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Emma Anholt [Sun, 20 Jun 2021 16:19:59 +0000 (09:19 -0700)]
i915g: Move cbuf color swizzle lookup to CSO creation time.
Saves walking the loop, and makes a nice place to store a swizzle for use
in other atoms.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Emma Anholt [Sun, 20 Jun 2021 15:52:25 +0000 (08:52 -0700)]
i915g: Compute 3DSTATE_BUF_INFO flags at surface create time.
No need to compute them at state emit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Emma Anholt [Sun, 20 Jun 2021 15:41:50 +0000 (08:41 -0700)]
i915g: Create an i915_surface for our pipe_surfaces.
Nothing added in yet, just wrapping the struct.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Emma Anholt [Sun, 20 Jun 2021 15:34:16 +0000 (08:34 -0700)]
i915g: Remove nr_cbufs loop.
This hardware definitely only does one cbuf.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>
Boyuan Zhang [Wed, 16 Jun 2021 20:07:31 +0000 (16:07 -0400)]
radeon/vcn: use st_rps_bits only when it's set
Fixes:
c9baccb5
For certain player which doesn't implement st_rps_bits, or when st_rps_bits
is set to 0 (e.g. it doesn't have rps explicitly defined in slice header),
we don't set st_rps_bits and the related flag, since we don't skip parsing
the rps structure in these cases.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11432>
Jason Ekstrand [Tue, 22 Jun 2021 16:05:11 +0000 (11:05 -0500)]
docs/isl: Consistently use 3-space tabs
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11529>
Jason Ekstrand [Tue, 22 Jun 2021 16:00:29 +0000 (11:00 -0500)]
docs/nir: Use 3-space tabs
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11529>
Jason Ekstrand [Tue, 22 Jun 2021 16:02:37 +0000 (11:02 -0500)]
editorconfig: Use 3-space tabs for .rst
This is what all the sphinx examples do and is what most of docs/
currently does.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11529>
Emma Anholt [Mon, 21 Jun 2021 21:01:46 +0000 (14:01 -0700)]
ci/llvmpipe: Mark two more multithread program link flakes.
Seen in #mesa-swrast-ci since adding the IRC channel.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11534>
Emma Anholt [Mon, 21 Jun 2021 19:31:14 +0000 (12:31 -0700)]
freedreno: Cooperate with tc to stop checking the BC for resource_busy().
The resource_busy() hook was having to check the batch cache for usage of
the resource, since TC didn't know how long our driver would. By
committing to calling the tc_driver_internal_flush_notify() hook on
non-deferred flushes, TC keeps track of which buffers have been used but
not flushed and considers them busy, saving us needing to look in the BC
(which we won't be able to do once we move it to being per-context).
drawoverhead test results (all numbers are throughput, n=5):
1, DrawElements ( 1 VBO| 0 UBO| 0 ) w/ no state change: -4.94214% +/- 2.45047%
7, DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ vertex attrib change: 48.3992% +/- 5.02827%
8, DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ 1 texture change: 26.0974% +/- 1.14932%
9, DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ 8 textures change: 12.6963% +/- 3.01077%
17, DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: 54.3846% +/- 35.0049%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11513>
Mike Blumenkrantz [Tue, 30 Mar 2021 18:48:50 +0000 (14:48 -0400)]
vk/util: add macros for multidraw
this simplifies implementations since a lot of the code is going to be
copy/pasted around, enabling related tweaks to be made in a centralized place
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11496>
Samuel Pitoiset [Mon, 17 May 2021 08:42:03 +0000 (10:42 +0200)]
radv: advertise extendedDynamicState2LogicOp
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10880>
Samuel Pitoiset [Mon, 17 May 2021 08:41:24 +0000 (10:41 +0200)]
radv: implement dynamic logic op
This is part of VK_EXT_extended_dynamic_state2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10880>
Timur Kristóf [Sat, 19 Jun 2021 12:36:15 +0000 (14:36 +0200)]
aco/gfx10: Emit barrier at the start of NGG VS and TES.
The Navi 1x NGG hardware can hang in certain conditions when
not every wave launched before s_sendmsg(GS_ALLOC_REQ).
As a workaround, to ensure this never happens, let's emit a
workgroup barrier at the beginning of NGG VS and TES.
Note that NGG GS already has a workgroup barrier so it doesn't
need this.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10837>
Timur Kristóf [Mon, 17 May 2021 10:28:15 +0000 (12:28 +0200)]
aco/gfx10: NGG zero output workaround for conservative rasterization.
Navi 1x GPUs have an issue: they can hang when the output vertex
and primitive counts are zero. The workaround is exporting a dummy
triangle.
This commit changes the dummy triangle's vertex so its positions
are all NaN. This should make sure the triangle is never rendered.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10837>
Timur Kristóf [Mon, 17 May 2021 12:00:58 +0000 (14:00 +0200)]
radv/llvm: Emit s_barrier at the beginning of NGG non-GS shaders.
This is to fix a hang that can potentially happen when not every
wave had launched when a gs_alloc_req is executed.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10837>
Boris Brezillon [Tue, 16 Jul 2019 17:20:49 +0000 (19:20 +0200)]
panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs
Based on turnip.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11139>
Boris Brezillon [Mon, 17 May 2021 12:51:11 +0000 (14:51 +0200)]
pan/midg: Add a flag to dump internal shaders
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/11139>
Boris Brezillon [Thu, 6 May 2021 06:43:00 +0000 (08:43 +0200)]
panfrost: Make panfrost_scoreboard_initialize_tiler() return the job pointer
In the vulkan driver we need to patch job headers when re-submitting
an already submitted batch. Change panfrost_scoreboard_initialize_tiler()
prototype to allow that.
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/11139>
Boris Brezillon [Wed, 19 May 2021 07:49:28 +0000 (09:49 +0200)]
panfrost: Constify the constants pointers passed to pan_blend functions
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/11139>
Jan Beich [Tue, 22 Jun 2021 00:29:40 +0000 (00:29 +0000)]
anv: adjust headers for non-GNU after
e9e1e0362b6c
src/intel/vulkan/anv_device.c:27:10: fatal error: 'sys/sysmacros.h' file not found
#include <sys/sysmacros.h>
^~~~~~~~~~~~~~~~~
Fixes:
e9e1e036 ("anv: implement VK_EXT_physical_device_drm")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11516>
Simon Ser [Fri, 8 Jan 2021 15:06:51 +0000 (16:06 +0100)]
radv: implement VK_EXT_physical_device_drm
This adds support for the Vulkan extension introduced in [1]. The
extension allows to get a VkPhysicalDevice's DRM node device IDs.
[1]: https://github.com/KhronosGroup/Vulkan-Docs/pull/1356
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8390>
Mike Blumenkrantz [Wed, 20 Jan 2021 19:29:14 +0000 (14:29 -0500)]
zink: use multidraw
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11498>
Mike Blumenkrantz [Wed, 20 Jan 2021 19:23:20 +0000 (14:23 -0500)]
zink: support multidraw
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11498>
Mike Blumenkrantz [Mon, 21 Jun 2021 15:25:04 +0000 (11:25 -0400)]
zink: clear the fb clears array instead of freeing it on reset
this cuts cpu usage by ~2% in sourcemark due to not reallocating the array
on every draw
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11499>
Mike Blumenkrantz [Fri, 18 Jun 2021 15:47:23 +0000 (11:47 -0400)]
zink: add more clear hooks
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11466>
Mike Blumenkrantz [Fri, 18 Jun 2021 15:55:54 +0000 (11:55 -0400)]
zink: add a flag for disabling conditional render during blit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11466>
Charlie Turner [Thu, 17 Jun 2021 09:17:26 +0000 (10:17 +0100)]
spirv_to_nir: Add environment variable to change default log level
During dEQP runs for radv, I see a lot of warnings like,
ERROR - dEQP error: SPIR-V WARNING:
ERROR - dEQP error: In file ../src/compiler/spirv/spirv_to_nir.c:1073
ERROR - dEQP error: Decoration not allowed on struct members: SpvDecorationRestrict
ERROR - dEQP error: 408 bytes into the SPIR-V binary
This fails jobs on Gitlab, due to,
Job's log exceeded limit of 4194304 bytes.
Job execution will continue but no more output will be collected.
Since it doesn't seem feasible right now to fix the many shaders in
the VK-CTS triggering this warning, add an environment toggle that
allows test runners to only see the level of commentary they want.
v2 from Martin:
- Add my SoB
v3 from Martin:
- fix the indentation (suggested by Eric)
- put the declarations at the top of the function
v4 from Martin:
- make vtn_default_log_level() static (Marcin)
- cache the default level in vtn_log (Marcin)
- move vtn_log_level_strings inside vtn_default_log_level()
- Fix the build issue on MSC
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11491>
Charlie Turner [Thu, 17 Jun 2021 11:43:27 +0000 (12:43 +0100)]
radv: Provide a toggle to avoid warnings about unsupported devices.
In the CI, we have such devices, and this message is printed many
hundreds of times. This results in a useless spam which makes it
difficult to see real issues.
v2 from Martin:
- Reword the commit message a bit
- Add a SoB
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11491>
Alejandro Piñeiro [Wed, 9 Jun 2021 22:21:45 +0000 (00:21 +0200)]
v3dv/build: meson infrastructure for multi-hw-version support
We follow the same approach that v3d. We compile the files that
depends on the version several times, passing a different version each
time. We link all those per-version libs on the main library.
Note that right now we only support version == 42, so the array of
supported versions is one-sized.
Also note that although we were doing a previous work to split
hw-version dependant code from general code, this is the first commit
that only inject the current V3D_VERSION on the former.
We have two cases where we hardcode the V3D_VERSION (as a full
wrapping would be an overkill) that we need to include here to avoid
warnings/errors if we do that before or after.
Having some exceptions also happens on v3d. As we are here we add some
comment on v3d clarifying that.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Fri, 28 May 2021 11:46:57 +0000 (13:46 +0200)]
v3dv: remove gen-dependant includes from v3dv_private
As we are here, we move the hooks for the packet definitions (used by
the broadcom packets helpers) to v3dv_cl
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Tue, 1 Jun 2021 08:39:20 +0000 (10:39 +0200)]
v3dv: don't use cl_packet_length for prepacked data
cl_packet_length depends on the specific hw generation packets, so it
is can't be included directly by main header.
The straight forward solution would be to allocate them dynamically,
based on the current generation. That ended to be complex and
messy. Also, even if that change between hw versions, it will not
change significantly.
So we just add some definition with the size of the packets we
prepack. We just need to be careful that this needs to be the maximum
value considering all the versions supported.
Note that on Opengl v3d does something similar, using hardcoded
values, but without a define, neither a runtime check.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Tue, 1 Jun 2021 08:41:00 +0000 (10:41 +0200)]
v3dv: split v3dv_descriptor hw version dependant to a new source file.
As part of this, we get rid of the v3dv_xxx_descriptor structs to
v3dv_descriptor. The main reason is that in order to support several
versions, we would need to define them several times. Also, they were
somewhat an overkill even before, as their main advantage was getting
the offset for each data on the combined case. That functionality is
replaced with some new helpers.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Mon, 14 Jun 2021 21:36:45 +0000 (23:36 +0200)]
v3dv: move several hw version dependant code to their own (v3dvx) source file
This includes code from:
* v3dv_cmd_buffer
* v3dv_meta_copy
* v3dv_meta_clear
v2: move some of the functions to source files that makes more sense
now (Iago).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Mon, 14 Jun 2021 21:36:08 +0000 (23:36 +0200)]
v3dv: split v3dv_device hw version dependant code to a new source file
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Mon, 14 Jun 2021 09:35:06 +0000 (11:35 +0200)]
v3dv: split v3dv_format hw version dependant code to a new source file
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Thu, 10 Jun 2021 12:43:54 +0000 (14:43 +0200)]
v3dv: split v3dv_image hw version dependant code to a new source file
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Thu, 10 Jun 2021 12:17:55 +0000 (14:17 +0200)]
v3dv: split v3dv_pipeline hw version dependant code to a new source file
v2: merge some of the v3dvx entrypoints to general pack methods (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Thu, 10 Jun 2021 11:39:35 +0000 (13:39 +0200)]
v3dv: start to move and wrap hw-version code with v3dv_queue
The idea would be to move all the code that uses cl_emit,
cl_emit_with_prepack, v3dx_pack, and any enum/structure definition
defined on the v3d pack headers.
All those methods would be defined on v3dvx_private (that would be the
equivalent to v3dx_context.h on v3d).
This commit includes the definition of v3dX for the current version
supported (42), a function calling wrapper, and the move for v3dv_queue
methods as a reference.
About the function calling wrapper, I took the idea from anv. We don't
have on v3d, but we added it because we foresee that we will need that
functionality more often. So without that macro, in order to call the
correct version of the method from the general code we would need to
do like we do on v3d, and doing something like this:
if (devinfo->ver >= 42)
return v3d42_pack_sampler_state(sampler, pCreateInfo);
else
return v3d33_pack_sampler_state(sampler, pCreateInfo);
So with the macro we can just do this:
v3dv_X(device, pack_sampler_state)(sampler, pCreateInfo).
Note that as mentioned, that is to be used on the general code, so a
runtime decision. If we are already on version-dependant code (so at
v3dx_queue for example) we just use v3dX, as at that point is a build
time decision.
Also, fwiw, I don't like too much the name of that macro, but I was
not able to think on a better one.
v2: merge job_emit_noop_bin and job_emit_noop_render (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Mon, 7 Jun 2021 22:19:55 +0000 (00:19 +0200)]
v3dv/cmd_buffer: move cl_emit calls for Draw methods to helpers
As we plan to move them to hw-dependant source files, but not the main
entrypoint.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Wed, 2 Jun 2021 11:53:31 +0000 (13:53 +0200)]
v3dv/cmd_buffer: add helper job_emit_binning_prolog
Just to isolate more tightly cl_emit calls. That would make easier to
split v3dv_cmd_buffer.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Alejandro Piñeiro [Fri, 4 Jun 2021 09:27:49 +0000 (11:27 +0200)]
v3dv: rename v3dv_pack for v3dvx_pack
For consistency, as we use use the v3dvx convention to point that it
depends on the hw version. Also on OpenGL the equivalent macro is
v3dx_pack.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
Dave Airlie [Tue, 22 Jun 2021 07:00:41 +0000 (17:00 +1000)]
i965: fix regression in pipe control on g45
The cleanups got the wrong value here, just noticed in drive by.
Fixes:
b505db3864b0 ("intel: Simplify few version checks involving G4X")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11519>
Erik Faye-Lund [Thu, 17 Jun 2021 11:46:42 +0000 (13:46 +0200)]
wgl: remove hard limit on pixelformats
Zink on Intel's Windows driver supports more than 256 pixelformats,
triggering asserts. So let's get rid of the hard-coded limit, and
instead use u_dynarray to store the pixelformat info.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11447>
Samuel Pitoiset [Mon, 31 May 2021 14:32:57 +0000 (16:32 +0200)]
ac/perfcounters: add a GPU block ID to every block definitions
The enumeration comes from AMDVLK.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
Samuel Pitoiset [Fri, 4 Jun 2021 11:26:09 +0000 (13:26 +0200)]
ac/perfcounters: add more SPM configuration fields
Add the number of SPM wires because sometimes a block has eg.
2 counters but only holds 3 16-bit counters instead of 4.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
Samuel Pitoiset [Fri, 4 Jun 2021 10:17:56 +0000 (12:17 +0200)]
ac/perfcounters: rename num_multi to num_spm_counters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
Samuel Pitoiset [Fri, 4 Jun 2021 07:59:59 +0000 (09:59 +0200)]
ac/perfcounters,radeonsi: rework performance counters layout
Instead of having different layouts which might complicate things when
some registers are missing, hardcode the SELECT and SELECT1 registers
into separate arrays.
The SELECT registers are "legacy" counters, while the SELECT1 registers
are SPM counters.
This is more verbose and emit more UCONFIG registers, but emitting the
SELECT registers is now much simpler and it seems less error prone.
This will also help emitting the SPM configuration.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
Samuel Pitoiset [Fri, 4 Jun 2021 06:55:17 +0000 (08:55 +0200)]
ac/perfcounters: remove ac_pc_block_base::num_prelude
This seems unnecessary if the first select register is correctly set.
This CB filter was always disabled anyways.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
Tapani Pälli [Mon, 21 Jun 2021 16:50:36 +0000 (19:50 +0300)]
anv: provide dummy vkCmdSetPatchControlPointsEXT
This makes dEQP-VK.api.version_check.entry_points pass and matches how
other drivers are handling this case. We do not support the feature but
still need to provide a dummy entrypoint.
v2: throw error if/when called (Jason)
Fixes:
0d031d1da34 ("anv: toggle on VK_EXT_extended_dynamic_state2")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11503>
Daniel Stone [Mon, 21 Jun 2021 18:44:01 +0000 (19:44 +0100)]
llvmpipe: Add handle export for resource_get_param
mesa/mesa@
2dcc9c7f54ed from mesa/mesa!6639 added a resource_get_param
hook for llvmpipe, which was nice since it gave lavapipe more features.
One of those features was not exporting llvmpipe textures, so those
parts were stubbed out and landed in an assert(0).
This completely broke kms_swrast (llvmpipe+GBM) on non-release builds,
since that definitely does need to export llvmpipe textures.
The query codepath which caused this explosion does fall back to
resource_get_handle() - which is how it worked previously - but not all
callers do this, so just do what all other drivers implementing
resource_get_param() do and open-code the translation.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reported-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Jonas Ådahl <jadahl@gmail.com>
Fixes:
2dcc9c7f54ed ("llvmpipe: add resource get param support.")
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6639
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11504>
Jason Ekstrand [Mon, 21 Jun 2021 15:25:41 +0000 (10:25 -0500)]
docs,isl: Document Sandy Bridge HiZ/stencil
This is annoying and tricky and we don't have all the gory details
written down in one central place anywhere. Add a docs section on it.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11500>
Bas Nieuwenhuizen [Tue, 16 Feb 2021 01:37:40 +0000 (02:37 +0100)]
nir: Add raytracing shader call lowering pass.
Really copying Jason's pass.
Changes:
- Instead of all the intel lowering introduce rt_{execute_callable,trace_ray,resume}
- Add the ability to use scratch intrinsics directly.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10339>
Bas Nieuwenhuizen [Tue, 20 Apr 2021 01:45:22 +0000 (03:45 +0200)]
nir: Add lowered vendor independent raytracing intrinsics.
For use in a generic nir_lower_shader_calls.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10339>
Emma Anholt [Thu, 17 Jun 2021 16:50:15 +0000 (09:50 -0700)]
freedreno: Handle full blit discards by invalidating the resource.
The previous implementation had several issues:
- It wasn't checking all the conditions necessary for "this blit updates
the whole surface", like PIPE_MASK_Z but not S on a depth/stencil
buffer.
- It would reset the previous batchbuffer, even if that batch had side
effects on other buffers.
- The layering was painful to follow and made any recursion extra
dangerous.
Now, we use a more conservative test (enough for the resource shadowing
case) and just invalidate the buffer up front, which should have the right
logic for discarding drawing to that resource.
I found I had to add fd_bc_flush_writer() to the end of fd_blitter_blit()
-- a flush was happening at fb state restore time when the discard flag
was set, and losing that flush breaks
dEQP-GLES31.functional.stencil_texturing.format.stencil_index8_cube.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
Emma Anholt [Tue, 15 Jun 2021 18:17:27 +0000 (11:17 -0700)]
freedreno: Move the rsc-based batch flushing to helper functions.
I want to reuse these, and this gives them nice names.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
Emma Anholt [Thu, 17 Jun 2021 16:33:24 +0000 (09:33 -0700)]
gallium/util: Introduce a helper for finding whole-resource blits.
This can be useful for tilers to discard previous rendering to a buffer
instead of reloading before drawing all the pixels.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
Emma Anholt [Wed, 16 Jun 2021 05:29:15 +0000 (22:29 -0700)]
gallium/draw: Garbage collect draw_pt_fetch_emit.
Now that we don't have draw_set_force_passthrough(), this middle end was
inaccessible.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>
Emma Anholt [Wed, 16 Jun 2021 05:25:12 +0000 (22:25 -0700)]
gallium/draw: Garbage collect draw_set_force_passthrough
Introduced in
c48da7d78b4e ("draw: add switch for drivers to force vertex
data passthrough") in 2008 and never used.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>
Simon Ser [Thu, 17 Jun 2021 08:23:24 +0000 (10:23 +0200)]
docs/envvars: document MESA_VK_WSI_PRESENT_MODE
This env var was introduced in
a182adfd83ad ("wsi: allow to override the
present mode with MESA_VK_WSI_PRESENT_MODE").
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11441>
Simon Ser [Wed, 16 Jun 2021 12:33:57 +0000 (14:33 +0200)]
vulkan/wsi/wayland: simplify wl_surface version check
No need to cast to a wl_proxy, there is a wl_surface variant
available.
No need to cache the result of get_version(), this is just a
one-line getter and doesn't perform any roundtrip.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11420>
Jordan Justen [Mon, 21 Jun 2021 01:10:02 +0000 (18:10 -0700)]
intel/gen125.xml: Drop GPGPU_WALKER
Ref:
f4902bb189c ("intel/genxml,anv,iris: Drop the legacy compute path from gen125.xml")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11489>
Lionel Landwerlin [Fri, 22 Jan 2021 10:38:41 +0000 (12:38 +0200)]
anv: implement VK_EXT_physical_device_drm
v2: add docs
update error messages (Sagar)
v3: Use fstat() (Jason)
v4: Do fstat() on demand (Jason)
v5: clear major/minor values if not present (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8649>
Marek Olšák [Tue, 1 Jun 2021 04:18:51 +0000 (00:18 -0400)]
radeonsi: cleanup some primitive discard CS TODOs regarding instancing, etc.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Tue, 1 Jun 2021 04:35:34 +0000 (00:35 -0400)]
radeonsi: skip buffer_atomic_add(ptr, n) when n=0 in the prim discard CS
This improves performance of the shader nicely.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 31 May 2021 23:21:28 +0000 (19:21 -0400)]
radeonsi: drop support for triangle fans from the prim discard CS
because it doesn't implement triangle fan splitting, so it's incomplete
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 31 May 2021 22:32:52 +0000 (18:32 -0400)]
radeonsi: drop gfx7 support from the prim discard CS to simplify code
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 31 May 2021 00:29:29 +0000 (20:29 -0400)]
radeonsi: remove the Z culling option from the primitive discard CS
Not useful.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 24 May 2021 19:43:54 +0000 (15:43 -0400)]
radeonsi: don't compile TES and GS draw_vbo variants for the prim discard CS
This also fixes the incorrect emit_draw_packets template argument.
The condition should be inverted.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 24 May 2021 23:42:17 +0000 (19:42 -0400)]
radeonsi: try to keep all VS input loads together for better perf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 24 May 2021 23:14:18 +0000 (19:14 -0400)]
radeonsi: remove incorrect comment about PA
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Mon, 24 May 2021 21:23:56 +0000 (17:23 -0400)]
radeonsi: set more precise max_waves in NGG code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Tue, 11 May 2021 15:47:10 +0000 (11:47 -0400)]
radeonsi: merge 2 conditional blocks with same condition into 1 in culling code
The block only loads input VGPRs from LDS, and the next block uses them.
The entering condition is the same, even though the second block is
the next shader part beginning with the prolog.
Simply move the VGPR loads into the prolog.
This decreases the shader code size by 12 bytes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Marek Olšák [Tue, 11 May 2021 04:40:39 +0000 (00:40 -0400)]
radeonsi: restructure si_get_vs_vgpr_comp_cnt for readability
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
Rob Clark [Sun, 20 Jun 2021 18:39:03 +0000 (11:39 -0700)]
freedreno: Flush if at risk of overflowing bos table
Fixes overflow crash in tex-miplevel-selection
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4007
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11487>
Rob Clark [Sun, 20 Jun 2021 15:58:42 +0000 (08:58 -0700)]
freedreno/a6xx: Handle fb_read in sysmem path
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11487>