Erik Faye-Lund
2c166a27fc
microsoft/compiler: remove needless error-returns
...
There's no root error-conditions in this code, just code that assumes
they exist and tries to handle them.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541 >
2021-08-26 18:57:40 +00:00
Filip Gawin
46f3582c6f
nir: fix ifind_msb_rev by using appropriate type
...
As you can see comparion "x < 0" doesn't make
sense if x is unsigned.
Fixes: a5747f8a ("nir: add opcodes for *find_msb_rev and lowering ")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12548 >
2021-08-26 18:35:31 +00:00
Filip Gawin
9083e9a483
nir: fix shadowed variable in nir_lower_bit_size.c
...
Fixes: 6d79298992 ("nir/lower_bit_size: fix lowering of {imul,umul}_high")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12527 >
2021-08-26 18:04:22 +00:00
Yiwei Zhang
3538b5af6d
venus: conditionally enable async descriptor set allocation
...
When VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not used to
create the pool, set allocation is guaranteed to not return
VK_ERROR_FRAGMENTED_POOL, and we can safely move set allocation to async
after doing resource tracking in the driver.
Enable after fully tested with assert(false) in the failure case.
Tested with:
- dEQP-VK.api.descriptor*
- dEQP-VK.api.object_management.*
- dEQP-VK.binding_model.descriptor*
- dEQP-VK.descriptor_indexing.*
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
288ce1b033
venus: check descriptor allocations against pool resource
...
Only kick in when async_set_allocation is enabled.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
70b03e96f9
venus: descriptor set to track descriptor count of last binding
...
Track the descriptor count to be used instead of the variable descriptor
count to avoid duplicate checks in later accounting.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
a1e91b1163
venus: descriptor pool to track pool state
...
It also tracks whether async set allocation is enabled.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
d2b1a7c2bb
venus: layout to track variable descriptor count binding info
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
d8e89b4e33
venus: descriptor layout to track more binding infos
...
Rename existing max_binding to last_binding to be consistent.
1. layout to track last binding index
2. binding to track descriptor type
3. binding to track descriptor count
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
ad934eb680
venus: add vn_descriptor_set_layout_init
...
Just a refactoring without functional changes.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
d4878636fe
venus: refactor failure path for sets allocation
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Sergii Melikhov
71e748ad24
dri2: Fix Null pointer dereferences
...
Fix defect reported by Coverity Scan CID-1490794
Fixes: 0d42033b26 ("glx/dri2: Require the driver to support v4 of __DRI_DRI2")
Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12563 >
2021-08-26 17:09:23 +03:00
Christian Gmeiner
84fa286602
etnaviv: remove primconvert
...
This is no longer used.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12516 >
2021-08-26 10:44:04 +00:00
Christian Gmeiner
a3d6aa43a6
etnaviv: export supported prim types
...
This is now handled by gallium, so the related codepaths can be dropped.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12516 >
2021-08-26 10:44:04 +00:00
Juan A. Suarez Romero
b22ba69615
broadcom/qpu: remove duplicated opcode variable
...
`opcode` is wrote twice.
Fixes CID 1490798: Incorrect expression (EVALUATION_ORDER).
Fixes: 8a5f2228db ("broadcom/qpu: add new lookup opcode description helper")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12554 >
2021-08-26 10:12:35 +00:00
Timur Kristóf
626b125857
aco: Use workgroup size from input shader info.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Timur Kristóf
c4ca08548b
radv: Remove superfluous workgroup size calculations.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Timur Kristóf
9fd36bbacd
radv: Calculate workgroup sizes in radv_pipeline.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Timur Kristóf
395c0c52c7
ac: Calculate workgroup sizes of HW stages that operate in workgroups.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Samuel Pitoiset
66b5f05727
ci: update the list of skipped tests for Fiji/RADV
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12553 >
2021-08-26 09:09:47 +00:00
Tomeu Vizoso
203f9da167
panvk: Initialize timestamp for disk cache
...
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/12552 >
2021-08-26 08:53:45 +00:00
Boris Brezillon
587046ed25
panfrost: Make pan_blit() return the tiler job pointer
...
The Vulkan driver needs to patch job headers when re-issueing a command
buffer. Return the tiler job pointer 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/12552 >
2021-08-26 08:53:45 +00:00
Boris Brezillon
e466e0ecd2
panfrost: Fix pan_blit_ctx_init() when start > end
...
This can happen when one wants to obtain a mirrored view. We need
to make sure the min <= max before emitting the viewport.
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/12552 >
2021-08-26 08:53:45 +00:00
Boris Brezillon
1c953ba212
panfrost: Prepare indirect draw helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
1447db0d51
panfrost: Prepare indirect dispatch helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
792a0ab0b1
panvk: Prepare per-gen split
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
c14c246439
panfrost: Only emit special attribute buffer entries on pre-v6 hardware
...
There's no special attributes on Bifrost.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
56a4aa9332
panfrost: Move panfrost_modifier_to_layout() to pan_texture.c
...
This function is not used outside pan_texture.c.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
5ca93f3599
panfrost: Get rid of all _packed structs in pan_context.h
...
Such that pan_context.h remains generic even after the per-gen XML
switch.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
0400c4ca1b
pan/gen_pack: Add parens around packed1/2 vars in pan_merge()
...
This way we can pass *desc instead of (*desc).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
fe1d33daaf
panfrost: Add generic mappings for the gen-specific tiler descriptor macros
...
This way the transition to per-gen XML files gets simpler.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
5f3910a343
panfrost: Get rid of the mali_xxx enum redefinitions
...
The gen_macros.h header should include the common header file when
PAN_ARCH is undefined, thus making those redefinitions useless.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
13c13efcac
panfrost: s/[idep_]midgard_pack/[idep_]pan_packers/
...
We will soon have per-gen pack headers. Let's rename the meson variables
to reflect that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
908dde360a
panfrost: Stop including midgard_pack.h directly
...
Include gen_macros.h instead so we can smoothly transition to per-gen
XMLs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
f96a30cea5
pan/gen_macros: Include midgard_pack.h from gen_macros.h
...
This way we will only have a single entry point, thus making the
transition to per-gen XML files easier.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
f29b45f934
pan/gen_macros: Map {TEXTURE,SAMPLER} to the arch-specific descriptor
...
This will ease the transition to per-arch XML files. While at it, patch
pan_cmdstream.c to use this new macro and avoid an #if section.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
2092f60ec1
pan/gen_macros: Move the TEXTURE definition to gen_macros.h
...
So we can use the same trick in panvk.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
8a058a9190
panfrost: Move the polygon list init logic to pan_cmdstream.c
...
This logic is Midgard specific and we need move the
panfrost_scoreboard_initialize_tiler() call to a per-arch file so
we can make panfrost_scoreboard_initialize_tiler a per-arch function.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
423f67c1bd
pan/gen_pack: Add pan_size() and pan_align() macros
...
And replace all references to MALI_xxx_{LENGTH,ALIGN} by
pan_{size,alignment}(xxx) calls so we can give generic alias to
midgard/bifrost specific descriptors.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:16 +02:00
Boris Brezillon
d7ff3973e9
panvk: Add missing midgard_pack dependency
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:16 +02:00
Boris Brezillon
188a2d3691
pan/gen_pack: Generalize the PREFIX() trick
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:16 +02:00
Marcin Ślusarz
e0533ebf16
intel/compiler: INT DIV function does not support source modifiers
...
BSpec says that for all generations.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5281
CC: mesa-stable
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12518 >
2021-08-26 07:51:44 +00:00
Timur Kristóf
346eb08a3d
radeonsi: Change GS vertex offset arguments to use gs_vtx_offset array.
...
This makes RadeonSI behave like RADV, and hence makes it possible to
use the NIR based ESGS I/O lowering and NGG lowering.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12511 >
2021-08-26 05:20:15 +00:00
Timur Kristóf
5b7446d74c
radv, ac, aco: Use indices 0-2 of gs_vtx_offset argument array on GFX9+.
...
Previously, indices 0, 2, 4 were used.
This worked, but it was somewhat unintuitive.
This commit changes it to use indices 0, 1, 2 instead, which
makes the code easier to understand.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12511 >
2021-08-26 05:20:15 +00:00
Ilia Mirkin
18962b94d3
glsl: fix explicit-location ifc matching in presence of array types
...
We were treating each field as if it took up a single slot. However
that's not the case. And with strict matching (GLSL 4.20+ / ES 3.1+) we
would end up not matching identical interfaces.
Fixes: c4545676d7 ("glsl/linker: fix location aliasing checks for interface variables")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12479 >
2021-08-26 04:07:29 +00:00
Simon Zeni
9ca7412033
meson: stop searching for execinfo
...
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Simon Zeni
973e9e25bd
util/u_debug_symbol: remove debug_symbol_name_glibc and execinfo dependency
...
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Simon Zeni
90be0d7963
glapi/gl_gentable.py: drop call to backtrace on no op
...
The function uses glibc specific functions
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Simon Zeni
0bbb9001c2
i915: remove use of backtrace and backtrace_symbols
...
The function `debug_backtrace` relied on glibc specific functions, and is
unused unless someone manually patches the source to set DEBUG_BACKTRACE_SIZE
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Nanley Chery
565f9105b7
anv/image: Don't assert that HiZ can be added
...
HiZ isn't yet enabled for Tile4/64.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00