platform/upstream/mesa.git
2 years agoutil/u_threaded: fix a CPU storage crash due to an invalid codepath taken
Marek Olšák [Fri, 15 Jul 2022 11:31:49 +0000 (07:31 -0400)]
util/u_threaded: fix a CPU storage crash due to an invalid codepath taken

Fixes: 3df9d8ed807 - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6837
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6594
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6613

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17556>

2 years agolavapipe: enable VK_EXT_depth_range_unrestricted.
Dave Airlie [Mon, 18 Jul 2022 06:04:17 +0000 (16:04 +1000)]
lavapipe: enable VK_EXT_depth_range_unrestricted.

This passes all the VK CTS tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>

2 years agollvmpipe/fs: handle unrestricted depth values.
Dave Airlie [Tue, 19 Jul 2022 04:41:01 +0000 (14:41 +1000)]
llvmpipe/fs: handle unrestricted depth values.

It moves the explicit clamping of incoming Z from vertex stages
after interp, to the depth clamp function.

It adds support to the depth clamp function to restrict incoming
Z values to 0..1 range.

It fixes the depth test conversions to allow unrestricted depth
values.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>

2 years agoutil/pack_color: clamp depth values outside range for unorm formats.
Dave Airlie [Mon, 18 Jul 2022 01:30:31 +0000 (11:30 +1000)]
util/pack_color: clamp depth values outside range for unorm formats.

For unrestricted depth ranges, depth clear values for unorm buffers
need to be explicitly clamped. However this has to happen in the
driver when we know the depth buffer format, not at the API level.

Just add clamps to the non-f32 cases and separate it out.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>

2 years agomesa/st: disable unrestricted fragment depth values for GL/GLES
Dave Airlie [Tue, 19 Jul 2022 05:15:03 +0000 (15:15 +1000)]
mesa/st: disable unrestricted fragment depth values for GL/GLES

GLES always clamps for 32-bit float buffers, GL doesn't require
it but setting this per API causes virgl to fail some tests.

To fix is properly we'd need to introduce a CAP to expose
this between host/guest.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>

2 years agogallium: add a rasterizer state bit for unrestricted depth values.
Dave Airlie [Tue, 19 Jul 2022 05:14:06 +0000 (15:14 +1000)]
gallium: add a rasterizer state bit for unrestricted depth values.

This tells the drivers to expect depth values outside the 0..1 range.

This is used for support VK_EXT_depth_range_unrestricted, but could
also be used for GL_NV_depth_buffer_float in GL.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>

2 years agollvmpipe: Allocate scene tiles dynamically
Dave Airlie [Fri, 1 May 2020 03:31:57 +0000 (13:31 +1000)]
llvmpipe: Allocate scene tiles dynamically

If you allocate this statically it's 1.5MB because the framebuffer might
be 16k x 16k, that's excessive.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>

2 years agollvmpipe: Indentation fix
Adam Jackson [Tue, 26 Jul 2022 18:13:04 +0000 (14:13 -0400)]
llvmpipe: Indentation fix

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>

2 years agoutil: add reallocarray wrapper for win32
Dave Airlie [Wed, 27 Jul 2022 21:00:07 +0000 (07:00 +1000)]
util: add reallocarray wrapper for win32

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>

2 years agollvmpipe: add some const qualifiers in lp_rast_linear_fallback.c
Brian Paul [Tue, 21 Jun 2022 20:47:12 +0000 (14:47 -0600)]
llvmpipe: add some const qualifiers in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: tighten up some code in lp_rast_linear_fallback.c
Brian Paul [Tue, 21 Jun 2022 20:45:58 +0000 (14:45 -0600)]
llvmpipe: tighten up some code in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: consolidate code in lp_rast_linear_fallback.c
Brian Paul [Mon, 18 Jul 2022 16:12:50 +0000 (10:12 -0600)]
llvmpipe: consolidate code in lp_rast_linear_fallback.c

Combine shade_quads_all() and shade_quads_mask() into new
shade_quads() function which takes a mask parameter.  It calls either
jit_function[RAST_WHOLE] or jit_function[RAST_EDGE_TEST] depending on
the mask argument.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: remove unneeded casts in lp_rast_linear_fallback.c
Brian Paul [Mon, 18 Jul 2022 16:10:29 +0000 (10:10 -0600)]
llvmpipe: remove unneeded casts in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: asst. clean-up in lp_rast_linear_fallback.c
Brian Paul [Mon, 20 Jun 2022 20:43:01 +0000 (14:43 -0600)]
llvmpipe: asst. clean-up in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: pass frontfacing param to jit_function() call
Brian Paul [Mon, 20 Jun 2022 19:57:22 +0000 (13:57 -0600)]
llvmpipe: pass frontfacing param to jit_function() call

Instead of 1, in shade_quads_all() and shade_quads_mask().  This fixes
a VMware test (dx10-is-front-face)

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: minor whitespace clean-up in lp_state_fs.h
Brian Paul [Thu, 14 Jul 2022 03:40:00 +0000 (21:40 -0600)]
llvmpipe: minor whitespace clean-up in lp_state_fs.h

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: make opaque field a 1-bit field
Brian Paul [Fri, 15 Jul 2022 14:43:07 +0000 (08:43 -0600)]
llvmpipe: make opaque field a 1-bit field

Reduces sizeof(lp_fragment_shader_variant) from 296 to 288 bytes.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agogallivm: rename 'var' param in emit_store_reg(), emit_store_var().
Brian Paul [Thu, 7 Jul 2022 21:04:35 +0000 (15:04 -0600)]
gallivm: rename 'var' param in emit_store_reg(), emit_store_var().

Rename 'dst' param' to 'vals'.  This parameter contains the values
which we're storing.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agogallivm: fix incorrect memset() in SOA emit_load_const()
Brian Paul [Tue, 5 Jul 2022 22:42:20 +0000 (16:42 -0600)]
gallivm: fix incorrect memset() in SOA emit_load_const()

The memset() call to zero-out the unused elements of outval[] used
the wrong bytecount.  Just replace it with a simpler for loop.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agogallivm: simplify shuffling in emit_store_reg()
Brian Paul [Tue, 5 Jul 2022 22:34:39 +0000 (16:34 -0600)]
gallivm: simplify shuffling in emit_store_reg()

The writemask can be implemented with just one llvm vector shuffle.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agogallivm: asst. clean-ups in lp_bld_swizzle.c
Brian Paul [Thu, 23 Jun 2022 04:07:12 +0000 (22:07 -0600)]
gallivm: asst. clean-ups in lp_bld_swizzle.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: replace 'unsigned' with enum types
Brian Paul [Wed, 22 Jun 2022 18:42:38 +0000 (12:42 -0600)]
llvmpipe: replace 'unsigned' with enum types

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: remove unneeded casts
Brian Paul [Wed, 22 Jun 2022 18:41:59 +0000 (12:41 -0600)]
llvmpipe: remove unneeded casts

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: asst. clean-ups in lp_state_setup.c
Brian Paul [Wed, 22 Jun 2022 18:41:18 +0000 (12:41 -0600)]
llvmpipe: asst. clean-ups in lp_state_setup.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: minor optimization in lp_linear_init_interp()
Brian Paul [Wed, 22 Jun 2022 18:29:24 +0000 (12:29 -0600)]
llvmpipe: minor optimization in lp_linear_init_interp()

Skip multiplying by 1/w when it's 1.0.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: asst. clean-ups in lp_linear_interp.c
Brian Paul [Wed, 22 Jun 2022 18:27:44 +0000 (12:27 -0600)]
llvmpipe: asst. clean-ups in lp_linear_interp.c

Comments, move var decls, fix code formatting.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agogallivm: asst. clean-ups in lp_bld_const.c
Brian Paul [Wed, 22 Jun 2022 15:57:47 +0000 (09:57 -0600)]
gallivm: asst. clean-ups in lp_bld_const.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: asst. clean-ups in lp_setup_rect.c
Brian Paul [Tue, 21 Jun 2022 21:13:49 +0000 (15:13 -0600)]
llvmpipe: asst. clean-ups in lp_setup_rect.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: minor white-space clean-up in lp_setup.h
Brian Paul [Tue, 21 Jun 2022 21:07:45 +0000 (15:07 -0600)]
llvmpipe: minor white-space clean-up in lp_setup.h

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agollvmpipe: asst. clean-up in lp_bld_depth.c
Brian Paul [Mon, 20 Jun 2022 20:42:21 +0000 (14:42 -0600)]
llvmpipe: asst. clean-up in lp_bld_depth.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

2 years agomailmap: fix order of emails for Axel Davy
David Heidelberg [Wed, 27 Jul 2022 20:12:07 +0000 (22:12 +0200)]
mailmap: fix order of emails for Axel Davy

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

2 years agonine: char can be unsigned on non-x86 platforms
David Heidelberg [Thu, 21 Jul 2022 21:43:07 +0000 (23:43 +0200)]
nine: char can be unsigned on non-x86 platforms

Keep sign by using int8_t to get the same result on non-x86 machines.

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

2 years agonine: Only enable thread_submit by default on x86
Icecream95 [Thu, 15 Jul 2021 02:30:53 +0000 (14:30 +1200)]
nine: Only enable thread_submit by default on x86

Possibly the bug breaking this is in box86, but given that there
aren't a whole lot of other reasons to be using Nine with a non-x86
Mesa, disable the feature unless we are running on x86.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

2 years agonine: Make vdecl_index_map always signed
Icecream95 [Sun, 18 Oct 2020 11:36:10 +0000 (00:36 +1300)]
nine: Make vdecl_index_map always signed

vdecl_index_map needs to be able to store negative values, but char is
not signed on all platforms, so change it to int8_t.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

2 years agozink/llvmpipe/ci: skip broken CTS ballot test.
Dave Airlie [Mon, 18 Jul 2022 06:36:55 +0000 (16:36 +1000)]
zink/llvmpipe/ci: skip broken CTS ballot test.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

2 years agozink: fixup subgroup vote/ballot enables.
Dave Airlie [Mon, 18 Jul 2022 04:15:41 +0000 (14:15 +1000)]
zink: fixup subgroup vote/ballot enables.

These are part of vulkan 1.1, but the ext are if you don't have 1.1.

This will enable some tests that break in CI

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

2 years agolavapipe: expose some subgroup extensions
Dave Airlie [Sun, 17 Jul 2022 23:18:48 +0000 (09:18 +1000)]
lavapipe: expose some subgroup extensions

These are part of vulkan 1.2, but expose them to be nice.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

2 years agollvmpipe: export ARB_shader_ballot
Dave Airlie [Mon, 18 Jul 2022 05:51:32 +0000 (15:51 +1000)]
llvmpipe: export ARB_shader_ballot

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

2 years agogallivm: fix casting around read invocation.
Dave Airlie [Mon, 18 Jul 2022 03:58:38 +0000 (13:58 +1000)]
gallivm: fix casting around read invocation.

Fixes zink KHR-GL46.shader_ballot_tests.ShaderBallotAvailability

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

2 years agogallivm: use progress from subgroup lowering.
Dave Airlie [Mon, 18 Jul 2022 05:00:01 +0000 (15:00 +1000)]
gallivm: use progress from subgroup lowering.

This makes sure the pack lowering gets called again.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

2 years agotu: Add debug option to use emulated renderpass support
Connor Abbott [Mon, 18 Jul 2022 14:49:59 +0000 (16:49 +0200)]
tu: Add debug option to use emulated renderpass support

This should be useful for stress-testing dynamic rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Use common vk_image_view base struct
Connor Abbott [Mon, 18 Jul 2022 11:07:57 +0000 (13:07 +0200)]
tu: Use common vk_image_view base struct

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Use common vk_image struct
Connor Abbott [Mon, 18 Jul 2022 10:30:59 +0000 (12:30 +0200)]
tu: Use common vk_image struct

This eliminates some boilerplate, and will be necessary to use the
common render pass implementation for debugging purposes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Add support for suspending and resuming renderpasses
Connor Abbott [Thu, 30 Jun 2022 15:36:05 +0000 (17:36 +0200)]
tu: Add support for suspending and resuming renderpasses

This is unfortunately very complicated because we have to stitch
together the state of the suspended passes after the fact, with primary
command buffers at submit time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agoutil/trace: Fix u_trace_*_iterator with no tracepoints
Connor Abbott [Fri, 8 Jul 2022 10:36:59 +0000 (12:36 +0200)]
util/trace: Fix u_trace_*_iterator with no tracepoints

If u_trace is empty then there are no chunks, and we didn't account for
that case.

This fixes tracing some dynamic rendering tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Split out some state into a separate struct
Connor Abbott [Wed, 29 Jun 2022 09:03:25 +0000 (11:03 +0200)]
tu: Split out some state into a separate struct

These bits of state will have to be treated specially when
suspending/resuming a render pass, because they will need to be tracked
across command buffers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Update more state with secondaries
Connor Abbott [Tue, 28 Jun 2022 15:18:06 +0000 (17:18 +0200)]
tu: Update more state with secondaries

Some of these are actually bugfixes, some like the drawcall information
are just for autotune so they are just performance fixes. However this
came from an audit into what state is used in CmdEndRenderPass().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Remove has_subpass_predication
Connor Abbott [Tue, 28 Jun 2022 15:06:01 +0000 (17:06 +0200)]
tu: Remove has_subpass_predication

The workaround this was used for was removed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Initial support for dynamic rendering
Connor Abbott [Tue, 28 Jun 2022 08:33:01 +0000 (10:33 +0200)]
tu: Initial support for dynamic rendering

Support for suspend/resume will be added later. This just sets up
the internal render pass, and adds support to pipeline creation and
secondary inheritance.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Remove usage of RenderPassBeginInfo
Connor Abbott [Fri, 24 Jun 2022 14:39:53 +0000 (16:39 +0200)]
tu: Remove usage of RenderPassBeginInfo

More preparation for using this with dynamic rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Move tu_render_pass definition up
Connor Abbott [Fri, 24 Jun 2022 13:15:44 +0000 (15:15 +0200)]
tu: Move tu_render_pass definition up

So that we can embed one in tu_cmd_buffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Disable GMEM for multiview inside tu_render_pass_gmem_config
Connor Abbott [Tue, 5 Jul 2022 17:49:22 +0000 (19:49 +0200)]
tu: Disable GMEM for multiview inside tu_render_pass_gmem_config

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Move TU_DONT_CARE_AS_LOAD into attachment_set_ops()
Connor Abbott [Fri, 24 Jun 2022 13:05:34 +0000 (15:05 +0200)]
tu: Move TU_DONT_CARE_AS_LOAD into attachment_set_ops()

So that we can share it with dynamic rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Rewrite tess factor emission
Connor Abbott [Thu, 14 Jul 2022 16:25:58 +0000 (18:25 +0200)]
tu: Rewrite tess factor emission

Emit it at EndRenderPass time, if the renderpass has tessellation. This
avoids all the special handling for secondaries, will work with
suspended/resumed render passes, and will handle secondaries that
contain render passes which will be allowed with dynamic rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu: Treat CP_WAIT_FOR_ME as a cache invalidate
Connor Abbott [Sat, 16 Jul 2022 20:58:59 +0000 (22:58 +0200)]
tu: Treat CP_WAIT_FOR_ME as a cache invalidate

The workaround for draws that need a CP_WAIT_FOR_ME didn't work if the
barrier before the draw is in a separate command buffer from the draw.
The barrier would add a pending CP_WAIT_FOR_ME, but it would get dropped
on the floor at the end of the command buffer and the draw wouldn't have
a pending CP_WAIT_FOR_ME so it wouldn't emit one. We don't know in the
barrier if the destination is a draw with the workaround, so we have two
options:

- Emit any pending CP_WAIT_FOR_ME at the end of the command buffer (and
  before secondaries) in case there is a workaround draw later. This
  will emit an extra CP_WAIT_FOR_ME at the end of the command buffer in
  case there is an indirect command barrier.
- Always assume at the beginning of the command buffer that there is a
  pending CP_WAIT_FOR_ME. This will emit an extra CP_WAIT_FOR_ME before
  the first workaround-requiring draw in the command buffer, in case
  there was a barrier earlier.

The only draws requiring a workaround are currently
vkCmdDraw*IndirectCount(), which we assume are rarer than indirect
command barriers, so we implement the second option. This entails
treating it as a cache invalidate.

This fixes some upcoming dynamic rendering CTS tests that do
vkCmdDrawIndirectCount() in a secondary but put the barrier for it in
the primary.

Fixes: 37939e9c546 ("turnip: Fix the lack of WFM before indirect draws")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agotu/lrz: Do not use framebuffer when inheriting LRZ
Connor Abbott [Wed, 29 Jun 2022 09:33:56 +0000 (11:33 +0200)]
tu/lrz: Do not use framebuffer when inheriting LRZ

The only thing it's used for is to get the image view, and we can't rely
on it existing anyway. With dynamic rendering, we only have the format
of the attachments and sample count, so moving forward we can't rely on
anything other than that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

2 years agonir/fold_16bit_tex_image: Default to only_fold_all.
Georg Lehmann [Tue, 26 Jul 2022 18:14:34 +0000 (20:14 +0200)]
nir/fold_16bit_tex_image: Default to only_fold_all.

No driver doesn't use this option.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17757>

2 years agoradeonsi: Stop using nir_legalize_16bit_sampler_srcs.
Georg Lehmann [Tue, 26 Jul 2022 17:55:36 +0000 (19:55 +0200)]
radeonsi: Stop using nir_legalize_16bit_sampler_srcs.

This pass is problematic because it truncates sources when there are type
mismatches. With the right nir_fold_16bit_tex_image options we can ensure
that there is never a mismatch.

Other changes: bias is affected by A16 https://reviews.llvm.org/D111754
And enable G16 as we recently confirmed that it's fully independent from A16.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17757>

2 years agozink/turnip: Add comments to already triaged failures for tu baseline
Danylo Piliaiev [Wed, 27 Jul 2022 10:23:13 +0000 (13:23 +0300)]
zink/turnip: Add comments to already triaged failures for tu baseline

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17762>

2 years agoir3: set UL flag before ir3_lower_subgroups
Chia-I Wu [Fri, 22 Jul 2022 17:33:20 +0000 (10:33 -0700)]
ir3: set UL flag before ir3_lower_subgroups

ir3_legalize_relative, extracted from ir3_legalize, assumes a0 is loaded
first in each block if there is any user in the block.
ir3_lower_subgroups breaks the assumption.  We need to do
ir3_legalize_relative first.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6902
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17720>

2 years agollvmpipe: fix texcoord analysis regression
Brian Paul [Mon, 25 Jul 2022 17:39:12 +0000 (11:39 -0600)]
llvmpipe: fix texcoord analysis regression

The texcoord component can be specifed by the src registers swizzle
or the variable's location_frac field.

Signed-off-by: Brian Paul <brianp@vmware.com>
Fixes: 90d011de8ee ("llvmpipe: fix texcoord analysis in llvmpipe_nir_fn_is_linear_compat()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6889
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17743>

2 years agoaco/ir: Add swapped opcode for v_cmp_u/v_cmp_o.
Georg Lehmann [Wed, 27 Jul 2022 10:43:31 +0000 (12:43 +0200)]
aco/ir: Add swapped opcode for v_cmp_u/v_cmp_o.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>

2 years agoaco/ir: Add v_cmp_class to get_cmp_info.
Georg Lehmann [Wed, 27 Jul 2022 10:34:27 +0000 (12:34 +0200)]
aco/ir: Add v_cmp_class to get_cmp_info.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>

2 years agoaco/ir: Add vcmpx opcode to get_cmp_info.
Georg Lehmann [Wed, 27 Jul 2022 10:27:07 +0000 (12:27 +0200)]
aco/ir: Add vcmpx opcode to get_cmp_info.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>

2 years agoaco/ir: Fix swapped nle.
Georg Lehmann [Wed, 27 Jul 2022 10:04:58 +0000 (12:04 +0200)]
aco/ir: Fix swapped nle.

Cc: mesa-stable
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>

2 years agoaco/ir: Add integer get_cmp_info.
Georg Lehmann [Wed, 27 Jul 2022 10:03:22 +0000 (12:03 +0200)]
aco/ir: Add integer get_cmp_info.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>

2 years agoaco/ir: Generalize (un)ordered_swapped.
Georg Lehmann [Wed, 27 Jul 2022 09:43:03 +0000 (11:43 +0200)]
aco/ir: Generalize (un)ordered_swapped.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>

2 years agopvr: Move BRN 44079, 48492 and 66011 code into pvrsrvkm specific directory
Sarah Walker [Mon, 4 Jul 2022 09:05:30 +0000 (10:05 +0100)]
pvr: Move BRN 44079, 48492 and 66011 code into pvrsrvkm specific directory

The new kernel mode driver will provide the relevant information directly to
userspace, so this code is only required for pvrsrvkm.

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17595>

2 years agoanv: Fix PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES with large BAR
Jordan Justen [Wed, 27 Jul 2022 03:20:24 +0000 (20:20 -0700)]
anv: Fix PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES with large BAR

Reported-by: Dave Airlie <airlied@redhat.com>
Fixes: fae88d8791b ("anv: make use of the new smallbar uAPI")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6937
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17761>

2 years agoradv: Use NIR-based NGG lowering with LLVM.
Timur Kristóf [Tue, 17 May 2022 17:18:37 +0000 (19:18 +0200)]
radv: Use NIR-based NGG lowering with LLVM.

Also cleanup some unused code.

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/12792>

2 years agoradv: Properly set LDS size for LLVM NGG shaders.
Timur Kristóf [Tue, 17 May 2022 16:51:54 +0000 (18:51 +0200)]
radv: Properly set LDS size for LLVM NGG shaders.

Update the esgs_ring_size after ac_nir_lower_ngg.

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/12792>

2 years agoradv/llvm: Remove incorrect hardcoded workgroup size from NGG GS.
Timur Kristóf [Thu, 9 Sep 2021 13:11:43 +0000 (15:11 +0200)]
radv/llvm: Remove incorrect hardcoded workgroup size from NGG GS.

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/12792>

2 years agoac/llvm: Implement GDS atomic add NIR intrinsic.
Timur Kristóf [Wed, 8 Sep 2021 08:14:09 +0000 (10:14 +0200)]
ac/llvm: Implement GDS atomic add NIR intrinsic.

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/12792>

2 years agodri: add [ax]bgr16161616 to format lookup tables
Manuel Stoeckl [Tue, 18 Jan 2022 03:03:20 +0000 (22:03 -0500)]
dri: add [ax]bgr16161616 to format lookup tables

Note: The format __DRI_IMAGE_FORMAT_ABGR16161616 was already
in the dri2_format_table, but had been hidden from outside view,
for lack of an official DRM fourcc. Since its fourcc has now been
assigned, it is safe to reveal the format.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>

2 years agodri: fix incorrect fourcc for R16G16B16A16_UNORM format
Manuel Stoeckl [Tue, 18 Jan 2022 03:02:48 +0000 (22:02 -0500)]
dri: fix incorrect fourcc for R16G16B16A16_UNORM format

The DRM fourcc for this format is DRM_FORMAT_ABGR16161616 = 'AB48', not
__DRI_IMAGE_FOURCC_RGBA16161616 = 'RA48'. This should have no outward
effect for clients, since the format does not get revealed by
dri2_query_dma_buf_formats, and is otherwise only used within the
library.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>

2 years agogbm: add GBM_FORMAT_[AX]BGR16161616
Manuel Stoeckl [Mon, 10 Jan 2022 02:30:29 +0000 (21:30 -0500)]
gbm: add GBM_FORMAT_[AX]BGR16161616

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>

2 years agodri_interface: add XBGR16161616 format
Manuel Stoeckl [Mon, 10 Jan 2022 02:28:36 +0000 (21:28 -0500)]
dri_interface: add XBGR16161616 format

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>

2 years agoac/gpu_info: require amdgpu DRM 3.15.0 (kernel 4.12) from July 2017
Marek Olšák [Mon, 11 Jul 2022 04:48:51 +0000 (00:48 -0400)]
ac/gpu_info: require amdgpu DRM 3.15.0 (kernel 4.12) from July 2017

to match the radeon requirement

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agogallium/radeon: require radeon DRM 2.50.0 (kernel 4.12) from July 2017
Marek Olšák [Mon, 11 Jul 2022 04:43:07 +0000 (00:43 -0400)]
gallium/radeon: require radeon DRM 2.50.0 (kernel 4.12) from July 2017

This is the latest radeon DRM version.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove unused has_unaligned_shader_loads
Marek Olšák [Mon, 11 Jul 2022 04:38:43 +0000 (00:38 -0400)]
ac/gpu_info: remove unused has_unaligned_shader_loads

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove amdgpu_gpu_info parameter from ac_query_gpu_info
Marek Olšák [Mon, 11 Jul 2022 04:27:59 +0000 (00:27 -0400)]
ac/gpu_info: remove amdgpu_gpu_info parameter from ac_query_gpu_info

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: use drm_amdgpu_device_info instead of amdgpu_gpu_info
Marek Olšák [Mon, 11 Jul 2022 04:24:46 +0000 (00:24 -0400)]
ac/gpu_info: use drm_amdgpu_device_info instead of amdgpu_gpu_info

These fields are identical but the latter is from libdrm.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoradeonsi: remove workarounds for radeon DRM < 2.45.0
Marek Olšák [Fri, 8 Jul 2022 00:33:40 +0000 (20:33 -0400)]
radeonsi: remove workarounds for radeon DRM < 2.45.0

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agogallium/radeon: require radeon DRM 2.45.0 from April 2016
Marek Olšák [Fri, 8 Jul 2022 00:08:43 +0000 (20:08 -0400)]
gallium/radeon: require radeon DRM 2.45.0 from April 2016

This removes most non-radeonsi workarounds.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoamd: require amdgpu DRM 3.2.0 from April 2016
Marek Olšák [Fri, 8 Jul 2022 00:08:43 +0000 (20:08 -0400)]
amd: require amdgpu DRM 3.2.0 from April 2016

This removes an early bug workaround.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove redundant vcn_encode
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant vcn_encode

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove redundant vce_encode
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant vce_encode

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove redundant uvd_encode
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant uvd_encode

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove redundant jpeg_decode
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant jpeg_decode

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove redundant uvd_decode
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant uvd_decode

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove vram_size and gtt_size in favor of *_kb variants
Marek Olšák [Thu, 7 Jul 2022 23:22:31 +0000 (19:22 -0400)]
ac/gpu_info: remove vram_size and gtt_size in favor of *_kb variants

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: use the kernel-reported GFX IP version to set gfx_level
Marek Olšák [Thu, 7 Jul 2022 23:00:16 +0000 (19:00 -0400)]
ac/gpu_info: use the kernel-reported GFX IP version to set gfx_level

hopefully this won't break the world.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: use hw_ip::ip_discovery_version to set IP versions
Marek Olšák [Thu, 7 Jul 2022 22:54:04 +0000 (18:54 -0400)]
ac/gpu_info: use hw_ip::ip_discovery_version to set IP versions

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: rework and extend device info to be more informative
Marek Olšák [Sun, 3 Jul 2022 19:27:59 +0000 (15:27 -0400)]
ac/gpu_info: rework and extend device info to be more informative

This is the result with AMD_DEBUG=info:

Device info:
    name = NAVI23
    marketing_name = AMD Radeon RX 6600
    num_se = 2
    num_rb = 8
    num_cu = 28
    max_gpu_freq = 2750 MHz
    max_gflops = 9856 GFLOPS
    l0_cache_size = 16 KB
    l1_cache_size = 128 KB
    l2_cache_size = 2048 KB
    l3_cache_size = 32 MB
    memory_channels = 8 (TCC blocks)
    memory_size = 8 GB (8192 MB)
    memory_freq = 14 GHz
    memory_bus_width = 128 bits
    memory_bandwidth = 224 GB/s
    clock_crystal_freq = 100000 KHz
    IP GFX     10.3  queues:1
    IP COMP    10.3  queues:4
    IP SDMA     5.2  queues:2
    IP VCN_DEC  3.0  queues:1
    IP VCN_ENC  3.0  queues:1
    IP VCN_JPG  3.0  queues:1

It might not be 100% correct with other chips.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: remove tabs
Marek Olšák [Sun, 3 Jul 2022 19:10:15 +0000 (15:10 -0400)]
ac/gpu_info: remove tabs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agoac/gpu_info: rename info fields to num_cu, memory_bus_width, memory_freq_mhz
Marek Olšák [Sun, 3 Jul 2022 19:09:16 +0000 (15:09 -0400)]
ac/gpu_info: rename info fields to num_cu, memory_bus_width, memory_freq_mhz

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>

2 years agollvmpipe: keep context list and use to track resource usage.
Dave Airlie [Mon, 25 Jul 2022 03:28:08 +0000 (13:28 +1000)]
llvmpipe: keep context list and use to track resource usage.

Just check across all contexts if a resource is referenced.

Fixes: 6bbbe15a783a ("Reinstate: llvmpipe: allow vertex processing and fragment processing in parallel")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17702>

2 years agollvmpipe: make last_fence a screen/rast object not a context one.
Dave Airlie [Fri, 22 Jul 2022 01:12:58 +0000 (11:12 +1000)]
llvmpipe: make last_fence a screen/rast object not a context one.

When a flush happens the per-context setup is used to hold the fence
for the last scene sent to the rasterizer. However when multiple
contexts are in use, this fence won't get returned to be blocked on.

Instead move the last fence to the rasterizer object, and return
that instead as it should be valid across contexts.

Fixes gtk4 bugs on llvmpipe since overlapping vertex/fragment.

Fixes: 6bbbe15a783a ("Reinstate: llvmpipe: allow vertex processing and fragment processing in parallel")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17702>

2 years agointel/dev: Enable remaining DG2 and ATS-M device IDs
Jordan Justen [Sat, 30 Apr 2022 09:30:57 +0000 (02:30 -0700)]
intel/dev: Enable remaining DG2 and ATS-M device IDs

Mostly Matt Roper's kernel patch commit message:

The device IDs here are associated with DG2 add-in cards. We need to
wait for some additional functionality (e.g., small BAR recovery) to
land before we're ready to upstream these.

Ref: https://patchwork.freedesktop.org/patch/483381/?series=103098&rev=1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12706>

2 years agov3dv: only check binning sync for semaphores for the first CL job
Iago Toral Quiroga [Mon, 18 Jul 2022 09:12:11 +0000 (11:12 +0200)]
v3dv: only check binning sync for semaphores for the first CL job

Semaphore waits in a command buffer only affect the first jobs we execute
in each hardware queue since jobs in the same queue are serialized against
each other. Binning syncs in particular, only affect CL jobs.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17594>