Commit Graph

136468 Commits

Author SHA1 Message Date
Mike Blumenkrantz 2643f9ed28 zink: ralloc screen objects
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9541>
2021-03-15 09:42:30 -04:00
Michel Zou 6083ebe078 swr: fix array-bounds warning
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>
2021-03-15 13:19:09 +00:00
Michel Zou 12af7f97ee swr: fix deprecated llvm 11 declaration warning
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>
2021-03-15 13:19:09 +00:00
Michel Zou c58a7c7108 swr: fix unused SplitString warning
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>
2021-03-15 13:19:09 +00:00
Michel Zou 17441cf92f swr: Fix SWR_CONTEXT pre-declaration
Silents a warning on msvc

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>
2021-03-15 13:19:09 +00:00
Michel Zou 0e8cdea6d9 swr: fix win32 intrinsics
The doc doesnt mention Index is altered when mask is null.
This is consistent with both llvm & migw implementations.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>
2021-03-15 13:19:09 +00:00
Michel Zou 31dbef02a0 swr: extern declaration for win32 intrinsics
This fixes compilation on msvc because llvm redefines these too
Closes #4417

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>
2021-03-15 13:19:09 +00:00
Samuel Pitoiset 321dadf229 radv: rework radv_use_dcc_for_image() a bit
To make it clear that only GFX8-9 have missing DCC features.

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/9526>
2021-03-15 13:22:44 +01:00
Samuel Pitoiset 9704ed3f57 radv: remove useless DCC disable check for 3D images on GFX10+
addrlib uses the S swizzle mode which disables DCC completely.

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/9526>
2021-03-15 13:22:44 +01:00
Samuel Pitoiset 2bc51226e1 radv: add missing SQTT events for copy_commands2/create_renderpass2
A bunch of entrypoints were missing.

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/9560>
2021-03-15 12:34:39 +01:00
Marcin Ślusarz 99e9a6721a anv: fix memory allocation error handling
Reported by Coverity.

Fixes: 0a7224f3ff ("anv: group as many command buffers into a single execbuf")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9596>
2021-03-15 10:53:41 +01:00
Lionel Landwerlin 87966b0aa0 intel: install intel_device_info
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9595>
2021-03-15 09:22:13 +00:00
Pierre-Eric Pelloux-Prayer 9e5623ccc3 frontends/va: fix protected slice data buffer read size
Read vlVaBuffer->size bytes instead of an hardcoded value.

Fixes: deb7dc82f6 ("frontends/va: handle protected slice data buffer")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553>
2021-03-15 09:43:15 +01:00
Pierre-Eric Pelloux-Prayer 4668cd30d9 radeonsi/sqtt: fix user event max size
Larger strings can corrupt rgp files.

Fixes: 5dc823304b ("radeonsi/sqtt: forward string markers to sqtt")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553>
2021-03-15 09:42:40 +01:00
Iago Toral Quiroga 177dcd4b68 broadcom/compiler: be more flexible scheduling TMU writes
V3D 4.x allows more flexibility, so take advantage of that. Generally,
we can reorder any writes in the same sequence, so long as they are
not the sequence terminator (which must always be last, since it is
the one triggering the operation), and TMUD writes, since these must
be ordered with respect to each other.

total instructions in shared programs: 13735183 -> 13731927 (-0.02%)
instructions in affected programs: 903057 -> 899801 (-0.36%)
helped: 2358
HURT: 746
Instructions are helped.

total max-temps in shared programs: 2322020 -> 2322009 (<.01%)
max-temps in affected programs: 619 -> 608 (-1.78%)
helped: 19
HURT: 11
Inconclusive result (value mean confidence interval includes 0).

total sfu-stalls in shared programs: 31494 -> 31489 (-0.02%)
sfu-stalls in affected programs: 182 -> 177 (-2.75%)
helped: 40
HURT: 40
Inconclusive result (value mean confidence interval includes 0).

total inst-and-stalls in shared programs: 13766677 -> 13763416 (-0.02%)
inst-and-stalls in affected programs: 901343 -> 898082 (-0.36%)
helped: 2349
HURT: 746
Inst-and-stalls are helped.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9555>
2021-03-15 08:03:28 +01:00
Iago Toral Quiroga 87ed614c47 broadcom/compiler: flag wrtmuc with a read dependency on last_tmu_config
Instead of using a write depdency. We use last_tmu_config to ensure ordering
of instructions participating in different TMU sequences. To this end,
all sequence terminators flag a write dependency on last_tmu_config, but
wrtmuc is not a sequence terminator, so we can be more flexible by flagging
it as a read depedency. This would prevent it to be moved into a previous
sequence (since it cannot be moved past the previous sequence terminator due
to the read depedency), but it allows it to be reordered with instructions in
the same sequence, which allows us to pair it up more effectively. Particularly,
it allows to pair up a wrtmuc with the sequence terminator of the same sequence,
turning code like this:

nop                  ; mov  tmut, r0     ; thrsw; wrtmuc (tex[0].p0 | 0x3)
nop                  ; nop               ; wrtmuc (tex[0].p1 | 0x0)
nop                  ; mov  tmus, r1

Into this:

nop                  ; mov  tmut, r0     ; thrsw; wrtmuc (tex[0].p0 | 0x3)
nop                  ; mov  tmus, r1     ; wrtmuc (tex[0].p1 | 0x0)

total instructions in shared programs: 13755738 -> 13735183 (-0.15%)
instructions in affected programs: 2510921 -> 2490366 (-0.82%)
helped: 10963
HURT: 485
Instructions are helped.

total max-temps in shared programs: 2322828 -> 2322020 (-0.03%)
max-temps in affected programs: 11303 -> 10495 (-7.15%)
helped: 608
HURT: 19
Max-temps are helped.

total sfu-stalls in shared programs: 31545 -> 31494 (-0.16%)
sfu-stalls in affected programs: 235 -> 184 (-21.70%)
helped: 62
HURT: 11
Sfu-stalls are helped.

total inst-and-stalls in shared programs: 13787283 -> 13766677 (-0.15%)
inst-and-stalls in affected programs: 2525187 -> 2504581 (-0.82%)
helped: 10989
HURT: 477
Inst-and-stalls are helped.

v2: add a comment explaining the read depdency (Piñeiro).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9555>
2021-03-15 08:03:28 +01:00
Timothy Arceri 6d6fd57e09 util/fossilize_db: remove compression from foz db helper
We now handle compression in the shared cache item creation code.
Compressing the cache item header with the already compressed blob
doesn't help much so lets just remove it.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593>
2021-03-15 03:34:48 +00:00
Timothy Arceri 4a98764da8 util/disk_cache: make use of the new compression helpers
This makes compression use more consistent between the zstd and
zlib libraries. It also reduces the amount of code required for
zlib use.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593>
2021-03-15 03:34:48 +00:00
Timothy Arceri d7ecbd5bf8 util: create some standalone compression helpers
This will be used by the following patch. It allows us to detangle
compression from the disk cache code, and abstract the underlying
compression libraries we use.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593>
2021-03-15 03:34:48 +00:00
Mike Blumenkrantz 1819283413 zink: use _mesa_set_search_and_add() for set management
this avoids extra hash lookups

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9565>
2021-03-14 21:57:00 -04:00
Mike Blumenkrantz c5029ddf8c zink: optimize resource usage tracking
we already have the batch usage info here for the resource, so if we know
the resource is already used on the batch then we don't need to also perform
a hash lookup to double check that it's really there

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9565>
2021-03-14 21:57:00 -04:00
Dave Airlie db0a71c9ae lavapipe: enable EXT_scalar_block_layout
The frontend should handle this.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9590>
2021-03-15 00:06:58 +00:00
Dave Airlie db8e2aad5e lavapipe: enable KHR_uniform_buffer_standard_layout
I think the frontend should handle all of this fine.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9590>
2021-03-15 00:06:58 +00:00
Vinson Lee 7e412a5d33 iris: Fix typos.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9382>
2021-03-15 00:01:30 +00:00
Vinson Lee 1193f2bd74 nv50/ir: Add constructor for NV50LegalizePostRA.
Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor
for this class does not initialize r63.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9326>
2021-03-14 16:49:49 -07:00
Mike Blumenkrantz 09d53d63ad zink: ci updates
disabling qbo piglit test for now due to lots of brokenness in zink which
makes them flaky, will be reenabled soon

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9566>
2021-03-14 19:22:39 -04:00
Mike Blumenkrantz 4e14c3dcb1 zink: remove extraneous flush in transfer_map_region_flush
this was only needed to cover up some other bugs:
* missing barriers for buffer sampler/image descriptors
* weirdness with first frame handling

there's better ways of handling both cases, and now they're handled better

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9566>
2021-03-14 18:51:58 -04:00
Mike Blumenkrantz d40e372fe9 zink: move buffer<->image copying to pipe_context::resource_copy_region hook
that's a todo item off the list

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9566>
2021-03-14 18:51:58 -04:00
Dave Airlie 88f41a8fa5 docs: update lavapipe features.txt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9551>
2021-03-15 06:39:53 +10:00
Dave Airlie 585b5fcf44 lavapipe: add single ssbo variable pointer support.
Multiple buffer seems to break with tess eval only,
something to investigate later.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8222>
2021-03-15 06:20:54 +10:00
Dave Airlie c843e3b5b4 lavapipe: move to common create render pass code
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>
2021-03-14 20:03:13 +00:00
Dave Airlie 8475ab7f92 lavapipe: move to the common casting interfaces
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>
2021-03-14 20:03:13 +00:00
Dave Airlie bd623d6cd6 lavapipe: move queue to base object
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>
2021-03-14 20:03:13 +00:00
Dave Airlie 3a466bfc1c lavapipe: add support for VK_KHR_create_renderpass2
Also move to the common code for create renderpass

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>
2021-03-14 20:03:13 +00:00
Vasily Khoruzhick 951788b560 lima/ppir: don't use list_length() in loop in regalloc and liveness analysis
list_length() complexity is O(n), so it's better to store number of regs
separately and use it instead of list_length().

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9570>
2021-03-14 16:39:26 +00:00
Vasily Khoruzhick d2ca8be998 lima: add precompile debug flag
This flag will be used by run from mesa-shader-db to trigger shader
compilation with default settings.

Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9583>
2021-03-14 16:16:03 +00:00
Gert Wollny 7c2c60ad67 r600/sfn remove some leftover debug output
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Gert Wollny 4459fc224b r600/sfn: lower idiv, imod, etc in nir
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Gert Wollny 7f020afcd6 r600/sfn: lower bitfield_extract and bitfield_insert in NIR
v2: lower bitfield insert to bitfield_select (Rhys Perry

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Gert Wollny 585eebdd0f r600/sfn: Fix including/not including c++ parts of header
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Gert Wollny 944f132578 r600/sfn: fix buffer offset for ssbo writes
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Gert Wollny a47a12b37c r600/sfn: remove unused code
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Gert Wollny 2e1cff0e85 r600/sfn: sort alu opcodes in switch statememt
This makes it easier to figure out which ops are already handled.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>
2021-03-14 13:28:44 +00:00
Andres Gomez c2e5c35786 .mailmap: add an alias for Eleni Maria Stea
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9435>
2021-03-14 14:06:49 +02:00
Axel Davy 8283ed65cf radeonsi: Limit the size of the in-memory shader cache
The in-memory shader cache can get significantly
huge in some rare cases.
Limit its size to 64MB on 32 bits, and 1GB else.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9578>
2021-03-13 21:51:38 +00:00
Axel Davy c23c3b7a77 st/nine: detect worker threads syncs for systemmem
If we detect too many syncs, use the stream_uploader,
which avoid syncs.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>
2021-03-13 21:23:24 +00:00
Axel Davy 205201c968 st/nine: Use stream_uploader for bad cases of systemmem
Using stream_uploader in case we cannot use unsynchronized
improves performance.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>
2021-03-13 21:23:24 +00:00
Axel Davy 05e6b0f200 st/nine: Always use DYNAMIC with SYSTEMMEM
The disadvantages of the DYNAMIC path over the
non-dynamic path are minor.
The advantages are many.

As we don't know if bad behaving apps use
non-dynamic SYSTEMMEM in a dynamic fashion,
let's be safe and always be dynamic.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>
2021-03-13 21:23:24 +00:00
Axel Davy 67c401b112 st/nine: Force DYNAMIC SYSTEMMEM for sw vertex processing
SW vertex processing buffers are supposed to be sorted in RAM
and to be immediately idle after use (thus you can write at the
same location again immediately).

DYNAMIC SYSTEMMEM is by far the best fit for now for these kind
of buffers, though it can be improved further. Indeed the use
pattern will cause a lot of syncs with csmt actived.
Thus disable csmt when full sw vertex processing is requested.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>
2021-03-13 21:23:24 +00:00
Axel Davy 380c2bf887 st/nine: Optimize dynamic systemmem buffers
Some apps use DYNAMIC SYSTEMMEM buffers and fill them in a
dynamic fashion with discard and nooverwrite locking flags.

To prevent uploading the whole buffer every draw call,
track the region needed for the draw call, and
upload only that region (or a bit more in order
to ease valid region tracking).

Try to aggressively upload with discard/unsynchronized.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>
2021-03-13 21:23:24 +00:00