Commit Graph

142643 Commits

Author SHA1 Message Date
Iván Briano f40a08d25c anv: Don't advertise unsupported shader stages
We don't currently support mesh or ray tracing, so don't advertise their
shader stages as supported for subgroups.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11893>
2021-07-15 16:32:54 +00:00
Timur Kristóf 19c8283729 radv: Use 128-sized vertex grouping for NGG shaders.
This matches what RadeonSI also does.
It seems to improve performance especially with NGG culling shaders.

Eg. in Doom Eternal this gives me +5ish fps.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11810>
2021-07-15 16:13:04 +00:00
Adam Jackson 17e62a3c23 mesa: (correctly) flush more in _mesa_make_current
The code being removed here requires that the old context have a
window-system drawable bound to the default framebuffer as a condition
of the context-release flush. I can find no justification for
restricting flushes to contexts like this, and GL 3.0 (etc) let you make
a context current without any drawable bound.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11423>
2021-07-15 15:10:17 +00:00
Adam Jackson 34342cce89 glx/drisw: Nerf PutImage when loaderPrivate == NULL
This means the drawable was already destroyed. This can happen during
diplay teardown, destroying the context will make it current first so it
can flush rendering and destroy textures and such, and if the drawable
is already destroyed then flushing to nowhere would crash.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11423>
2021-07-15 15:10:17 +00:00
Vinson Lee f5c8761eda asahi: Move assignment after null check.
Fix defect reported by Coverity Scan.

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking so suggests that it may be null,
but it has already been dereferenced on all paths leading to the
check.

Fixes: dcd2d8ca50 ("asahi: Track more Gallium state")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11898>
2021-07-15 13:45:33 +00:00
Jose Maria Casanova Crespo 8351ad1719 Revert "ci: disable Broadcom CI"
Our POE switch rebooted with factory settings. So devices weren't turning
on/off because of failing SMNP auth.

This reverts commit 87cdcf5645.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11906>
2021-07-15 13:36:25 +02:00
Timothy Arceri f62ff2e7dc util: document that workaround also fixes Riptale
The games use an idential executable.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11871>
2021-07-15 10:28:34 +00:00
Iago Toral Quiroga f481c290b0 v3dv: refactor meta copy/clear code
This change does the following:

- Moves image clearing code from v3dv_meta_copy.c to v3dv_meta_clear.c
  where it belongs.
- Renames v3dv_meta_copy.h to v3dv_meta_common.h since now it is required
  by the copy and clear code.
- Renames 'struct framebuffer_data' type.
- Merges v3dvx_meta_clear.c and v3dvx_meta_copy.c into v3dvx_meta_common.c.
- Prefixes all "public" meta functions with the 'meta' prefix.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11902>
2021-07-15 12:16:55 +02:00
Iago Toral Quiroga 18642987fd v3dv: remove more dead clearing code
We forgot to remove the v3dvx code for the clearing code fallbacks
we removed after we implemented layered clears.

Fixes: 5ba7f64b45 ('v3dv: remove fallback path for vkCmdClearAttachments')

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11902>
2021-07-15 12:16:34 +02:00
Iago Toral Quiroga 87cdcf5645 ci: disable Broadcom CI
The CI is down at the moment, disable it while we figure out
a solution.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11901>
2021-07-15 09:56:22 +02:00
Samuel Pitoiset 1ea156f44c radv: only init the TC-compat ZRANGE metadata for the depth aspect
With separate depth/stencil layouts, if the depth aspect is first
initialized and then cleared, the ZRANGE_PRECISION metadata might
be different than 0. Initializing it again for the stencil aspect
will overwrite the value.

Fixes rendering glitches with Scarlet Nexus on GFX8-9.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5052
Cc: 21.1 21.2 mesa-stable
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/11883>
2021-07-15 07:21:50 +00:00
Vinson Lee 6e4e6d9527 nv50/ir: Initialize Value member id in constructor.
Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member id is not initialized in
this constructor nor in any functions that it calls.

Suggested-by: Karol Herbst <kherbst@redhat.com>
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/10401>
2021-07-14 22:44:46 -07:00
Vasily Khoruzhick 4a3269dff6 lima: handle fp16 vertex formats
12128fb135 marked fp16 vertex formats supported, but they aren't actually handled
by lima_pipe_format_to_attrib_type(). Fix it by handling it there.
FP16 seems to be the only missing index which is 0x3.

Fixes: 12128fb135 ("lima: add natively supported vertex buffer formats")

Cc: 21.1 mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11872>
2021-07-15 01:06:52 +00:00
Chia-I Wu 12d18abfe7 venus: refactor vn_EndCommandBuffer
Add vn_cmd_submit as a wrapper to vn_instance_ring_submit.  It is also
designed such that it can be called from any of the vn_Cmd* functions.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11896>
2021-07-15 00:52:43 +00:00
Dave Airlie f144d91496 lavapipe: fix multi-draw regression in shader parameters test
dEQP-VK.draw.shader_draw_parameters.base_instance.draw,Fail
dEQP-VK.draw.shader_draw_parameters.base_instance.draw_indexed,Fail

Fixes: 6b6dda56b5ff ("lavapipe: increment drawid for multidraws")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11894>
2021-07-14 23:40:07 +00:00
Icecream95 bedbe35d6b pan/gen_pack: Use 1U for unpacking log2 to avoid undefined behaviour
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11869>
2021-07-14 23:20:13 +00:00
Icecream95 04c02418d7 pan/decode: Avoid undefined behaviour on shift in bits()
v2: Return 0 instead of `word` (Alyssa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11869>
2021-07-14 23:20:13 +00:00
Jason Ekstrand 6642749458 intel/dev: Add a max_cs_workgroup_threads field
This is distinct form max_cs_threads because it also encodes
restrictions about the way we use GPGPU/COMPUTE_WALKER.  This gets rid
of the MIN2(64, devinfo->max_cs_threads) we have scattered all over the
driver and puts it in a central place.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14 23:02:34 +00:00
Jason Ekstrand 915e5a8cc3 intel/dev: Handle BSW naming issues
Braswell, a particular Cherryview variant, is especially strange.  We
can't even get the chip name from the PCI ID and instead have to look at
fusing information to decide if it's a 400 or a 405.  Pull that into the
common code as well.  This fixes BSW naming on ANV and crocus.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14 23:02:34 +00:00
Jason Ekstrand 56d70ba686 intel/dev: Put the device name in intel_device_info
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14 23:02:34 +00:00
Jason Ekstrand c24ba6cecb intel/dev: Handle CHV CS thread weirdness in get_device_info_from_fd
Cherryview is weird in that the actual limits we can expose through GL
are dependent on fusing information which is only obtainable at runtime.
The same PCI ID may have different configurations with different maximum
CS thread counts.  We currently handle this in i965 and ANV by doing the
calculation in the driver.

This dates back to when intel_device_info was computed from the PCI ID.
Now that we have get_device_info_from_fd, we can move the CHV stuff
there and get it out of the driver.  This fixes CHV thread counts on
crocus as well.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
2021-07-14 23:02:34 +00:00
Joshua Ashton 1744372714 lavapipe: Use common Vulkan format helpers
Drops the vk_format_to_pipe (and it's outdated table) for vk_format_to_pipe_format, aswell as the duplicated vk_format_aspects function.

The old format table was missing USCALED and other values, causing incorrect rendering in many games.

Fixes rendering in Portal 1, Hat in Time, Half-Life 2 and pretty much every other D3D9 title with DXVK.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11863>
2021-07-15 08:15:16 +10:00
Eric Engestrom 376fb4f55f docs: drop duplicate `21.1` branch name from release calendar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11892>
2021-07-14 21:55:31 +01:00
Eric Engestrom e1fe0bb0ca docs: update calendar and link releases notes for 21.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11892>
2021-07-14 21:29:39 +01:00
Eric Engestrom cd3d8f0f7a docs: add release notes for 21.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11892>
2021-07-14 21:28:56 +01:00
Mike Blumenkrantz 6689c3917e lavapipe: increment drawid for multidraws
Fixes: f99f7c06 ("lavapipe: implement multidraw ext")

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11878>
2021-07-14 19:20:09 +00:00
Mike Blumenkrantz d08c84ab0c zink: improve detection for broken drawids
this is also broken for multidraws where drawid shouldn't be incremented

Fixes: 2d32d123e5 ("zink: avoid unnecessarily rewriting gl_DrawID")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11878>
2021-07-14 19:20:09 +00:00
Dylan Baker 28c5e88931 docs: update calendar for 21.2.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11889>
2021-07-14 12:00:02 -07:00
Dave Airlie a3271b3f73 lvp: fixup multi draw memcpys
This doesn't fix the tests but it fixes a bunch of valgrind
uninitialised value warnings

Fixes: f99f7c06e7 ("lavapipe: implement multidraw ext")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11870>
2021-07-14 18:06:18 +00:00
Alyssa Rosenzweig a18f434d58 panfrost: Warn on transitions to linear
The timing is critical for e.g video players, but this can also happen
unexpectedly in other apps which could be a symptom of deeper trouble.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig d5fc0ceafd panfrost: Warn on get_fresh_batch
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig f2e3ac5c62 panfrost: Warn on get_fresh_batch_for_fbo
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig a266a0fbbb panfrost: Log reasons for flushes
Premature flushes (i.e. before pipe->flush() is called) can be
expensive, particularly if they require extra reloads/resolves.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig bcd915622b panfrost: Warn on going out of AFBC
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig 5bd91a632b panfrost: Warn on software conditional rendering
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig 256f4a5b02 panfrost: Add perf_debug macros
Lifted from freedreno.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
2021-07-14 17:41:27 +00:00
Dylan Baker fae28b0fce docs/relnotes/new_features: empty for next release cycle 2021-07-14 10:22:12 -07:00
Dylan Baker 1a05c595a3 VERSION: bump version for 21.3 development cycle 2021-07-14 10:22:12 -07:00
Ian Romanick 3cb203303c intel/compiler: Update block IPs once in opt_cmod_propagation
No difference proven at 95.0% confidence (n=10) in
dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13.

v2: Only update each block's IP data once instead of once per block.
Suggested by Emma.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
2021-07-14 09:57:06 -07:00
Ian Romanick 8f1052938d intel/compiler: Update block IPs once in register_coalesce
Performance improvement in
dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13 for n=30:

release build (w/Fedora build flags): -0.82% ± 0.23%
Meson -Dbuildtype=debugoptimized:     -0.74% ± 0.27%

The difference in the debugoptimized build is the calls to
inst_is_in_block(block, this) still exist on each call to remove().

v2: Only update each block's IP data once instead of once per block.
Suggested by Emma.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
2021-07-14 09:57:04 -07:00
Ian Romanick f3f3817307 intel/compiler: Update block IPs once in dead_code_eliminate
Performance improvement in
dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13 for n=30:

release build (w/Fedora build flags): -7.79% ± 0.25%
Meson -Dbuildtype=debugoptimized:     -5.10% ± 0.40%

The difference in the debugoptimized build is the calls to
inst_is_in_block(block, this) still exist on each call to remove().

v2: Only update each block's IP data once instead of once per block.
Suggested by Emma.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
2021-07-14 09:57:01 -07:00
Ian Romanick 8ca1bc5f94 intel/compiler: Add cfg_t::adjust_block_ips() method
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
2021-07-14 09:56:59 -07:00
Ian Romanick 8206b04d43 intel/compiler: Add the ability to defer IP updates in backend_instruction::remove
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
2021-07-14 09:56:46 -07:00
Daniel Schürmann 71aab9607d aco/live_var_analysis: change worklist to a single integer
Reduces overall compile times by ~0.45%.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11879>
2021-07-14 18:10:56 +02:00
Daniel Schürmann 20eaa074ec aco/insert_waitcnt: Remove many unnecessary wait_imm.combine()
Reduces overall compile times by ~0.2%.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11879>
2021-07-14 18:10:50 +02:00
Daniel Schürmann 114d38e57d aco/isel: avoid unnecessary calls to nir_unsigned_upper_bound()
These were responsible for ~20% of the time
spent in instruction selection.
Reduces overall compile times by ~0.5%.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11879>
2021-07-14 18:10:40 +02:00
Iago Toral Quiroga 940725a7d9 broadcom/compiler: implement gl_PrimitiveID in FS without a GS
OpenGL ES 3.1 specifies that a geometry shader can write to gl_PrimitiveID,
which can then be read by a fragment shader.

OpenGL ES 3.2 additionally adds the capacity for the fragment shader
to read gl_PrimitiveID even if there is no geometry shader. This
commit adds support for this feature, which is also implicitly
expected by the geometry shader feature in Vulkan 1.0.

Fixes:
dEQP-VK.pipeline.framebuffer_attachment.no_attachments
dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11874>
2021-07-14 12:05:56 +00:00
Iago Toral Quiroga 82fadbd3ab v3d: better scissor tracking
If all drawing is scissored but we have multiple discontinuous
scissor rects, we end up flushing all the tiles in the rect that
covers all scissor rects, which can be a waste, particularly for
large render targets. The obvious case for this are updates to a
mega texture or atlas for example.

This change checks if all rendering happenings against scissor
rects, in which case it keeps track of the rects and uses this to
discard tiles that are not included in any of them.

This optimization needs to be disabled if we have any
non-scissored rendering, including non-scissored clears.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11875>
2021-07-14 13:46:53 +02:00
Erik Faye-Lund c7fefc0f2f zink: respect line_rectangular state
This is mostly a theoretical fix for the Nine frontent, which doesn't
want rectangular lines even when multisampling.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11841>
2021-07-14 07:28:39 +00:00
Erik Faye-Lund a4cb07dcd5 zink: check for right feature
I accidentally repeated the rectangular lines test instead of checking
for smooth lines. Whoopsie!

Fixes: c3b0f439a7 ("zink: fill in the right line-mode based on state")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11841>
2021-07-14 07:28:39 +00:00