Commit Graph

142731 Commits

Author SHA1 Message Date
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
Erik Faye-Lund e3542b35a8 vulkan: allocate host-visible memory for swapchain images
The Vulkan 1.2 specification, section 11.2.12 ("Host Access to Device
Memory Objects") say the following:

> memory must have been created with a memory type that reports
> VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT

Since there's no guarantee that there's any memory that is *both*
device-local *and* host-visible, let's just use the latter requirement.

Fixes: 8af568e4ae ("vulkan: implement wsi_win32 backend")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11848>
2021-07-14 07:09:38 +00:00
Erik Faye-Lund d0c7a2106b vulkan: do not map zero-sized region of memory
The Vulkan 1.2 specification, section 11.2.12 ("Host Access to Device
Memory Objects") say the following:

> If size is not equal to VK_WHOLE_SIZE, size must be greater than 0

So, mapping a zero-sized range is illegal. Let's instead map the
reported size of the image, which we already know.

Fixes: 8af568e4ae ("vulkan: implement wsi_win32 backend")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11848>
2021-07-14 07:09:38 +00:00
Jason Ekstrand 2fd989a298 anv/allocator: Use list->u64 in free_list_push
Since we always modify this structure with atomics on the u64, it seems
better to use the u64 here too.  I have no idea if this fixes a bug.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11857>
2021-07-14 05:50:46 +00:00
Joshua Ashton f5946354d3 llvmpipe: Handle NULL views in llvmpipe_cleanup_stage_sampling
This is the only barrier to lavapipe fully working in RenderDoc.

Fixes: 21864bdaae ("llvmpipe: unmap display target of shader image/sampler")

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11856>
2021-07-14 02:50:30 +00:00
Rob Clark 86f09b14df freedreno+turnip: Add a6xx gen4 support
This adds support for a660 and a635.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark 7c7722304b freedreno+turnip: Get device name from device-info table
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark a4559c9550 freedreno+turnip: Add has_8bpp_ubwc
Newer a6xx devices seem to drop 8b/pixel UBWC support.

The turnip part was adapted from Jonathans patch on !10892

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark e552784e68 freedreno+turnip: Add has_cp_reg_write
Newer a6xx devices drop this packet from the sqe firmware, and use
direct (pkt4) register writes instead for the few cases that previously
used CP_REG_WRITE.

The turnip part was adapted from Jonathans patch on !10892

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark f74d0bf05e turnip: Get has_sample_locations from fd_dev_info
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark 3f1c4a86bb turnip: Get has_tex_filter_cubic from fd_dev_info
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark 64af60cfb3 turnip: Get indirect_draw_wfm_quirk from fd_dev_info
At some point we might want to change this to minimum fw version, but
for now it can be a bool.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00
Rob Clark 06000f42ed turnip: Get storage_16bit from fd_dev_info
Removing more gpu_id checks that will become bogus as we add more a6xx.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
2021-07-14 01:58:00 +00:00