platform/upstream/mesa.git
2 years agofreedreno/drm: Move suballoc_bo to device
Rob Clark [Mon, 25 Oct 2021 22:59:23 +0000 (15:59 -0700)]
freedreno/drm: Move suballoc_bo to device

Having it in msm_pipe isn't saving any locking.  But it does mean that
cleanup_fences() can drop the last pipe reference, which in turn drops
the last suballoc_bo reference, which can cause recursion back into the
bo cache.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5562
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13521>

2 years agofreedreno/drm: Add some asserts
Rob Clark [Mon, 25 Oct 2021 17:13:25 +0000 (10:13 -0700)]
freedreno/drm: Add some asserts

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13521>

2 years agomesa: add a no_error path to _mesa_handle_bind_buffer_gen
Marek Olšák [Wed, 20 Oct 2021 02:45:47 +0000 (22:45 -0400)]
mesa: add a no_error path to _mesa_handle_bind_buffer_gen

It only helps when it's inlined, which is true for glBindBuffer.

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

2 years agomesa: remove redundant flagging USAGE_ARRAY_BUFFER
Marek Olšák [Mon, 25 Oct 2021 00:39:11 +0000 (20:39 -0400)]
mesa: remove redundant flagging USAGE_ARRAY_BUFFER

We do that in gl*Pointer, glBindVertexBuffer, etc.

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

2 years agomesa: move setting USAGE_PIXEL_PACK_BUFFER out of BindBuffer to reduce overhead
Marek Olšák [Wed, 20 Oct 2021 03:48:51 +0000 (23:48 -0400)]
mesa: move setting USAGE_PIXEL_PACK_BUFFER out of BindBuffer to reduce overhead

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

2 years agomesa: remove USAGE_ELEMENT_ARRAY_BUFFER because it's unused and adding overhead
Marek Olšák [Wed, 20 Oct 2021 03:30:07 +0000 (23:30 -0400)]
mesa: remove USAGE_ELEMENT_ARRAY_BUFFER because it's unused and adding overhead

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

2 years agovulkan: Fix entrypoint generation when compiling for x86 with MSVC
Boris Brezillon [Mon, 25 Oct 2021 16:37:21 +0000 (18:37 +0200)]
vulkan: Fix entrypoint generation when compiling for x86 with MSVC

When compiling for x86 with MSVC, Vulkan API entry points follow the
__stdcall convention (VKAPI_CALL maps to __stdcall), which uses the
following name mangling:

   _<function_name>@<arguments_size>

Fix the vk_entrypoint_stub()/alternatename definitions accordingly.

Fixes: 6d44b21d4fd ("vulkan: Fix weak symbol emulation when compiling with MSVC")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13516>

2 years agonir/serialize: Make more space for intrinsic_op allowing 1024 ops
Danylo Piliaiev [Wed, 20 Oct 2021 14:36:27 +0000 (17:36 +0300)]
nir/serialize: Make more space for intrinsic_op allowing 1024 ops

We are close to the limit of 512 intrinsics, make more space to
be able to support up to 1024 intrinsics.

Take one bit from packed_const_indices, they shouldn't suffer in
a common case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13456>

2 years agoaco: only load streamout buffers if streamout is enabled
Samuel Pitoiset [Mon, 25 Oct 2021 11:58:20 +0000 (13:58 +0200)]
aco: only load streamout buffers if streamout is enabled

The streamout_config SGPR is used to determine if streamout is enabled.

This fixes a GPU hang with various transform feedback tests:
 - dEQP-GLES3.functional.transform_feedback.*
 - KHR-GL46.transform_feedback.api_errors_test
 - KHR-GL46.draw_indirect.basic-draw*-xfbPaused
 - KHR-GL46.geometry_shader.api.draw_calls_while_tf_is_paused

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13514>

2 years agoradv: report error messages when the driver can't be initialized
Samuel Pitoiset [Wed, 13 Oct 2021 16:53:13 +0000 (18:53 +0200)]
radv: report error messages when the driver can't be initialized

Not only with RADV_DEBUG=startup.

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

2 years agoradv: fix build errors with Android
Samuel Pitoiset [Wed, 20 Oct 2021 07:23:26 +0000 (09:23 +0200)]
radv: fix build errors with Android

Fixes: 49c3a88fadd ("radv: implement VK_KHR_format_feature_flags2")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5518
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/13450>

2 years agoradv: remove old RADV_TRACE_FILE warning
Samuel Pitoiset [Wed, 20 Oct 2021 07:49:27 +0000 (09:49 +0200)]
radv: remove old RADV_TRACE_FILE warning

It has been replaced by RADV_DEBUG=hang a year ago.

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

2 years agopanfrost: Remove duplicated #if
Alyssa Rosenzweig [Tue, 5 Oct 2021 22:52:13 +0000 (18:52 -0400)]
panfrost: Remove duplicated #if

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13208>

2 years agopanfrost: Remove ancient TODO
Alyssa Rosenzweig [Tue, 5 Oct 2021 20:17:02 +0000 (16:17 -0400)]
panfrost: Remove ancient TODO

This was implemented ages ago.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13208>

2 years agopanfrost: Enable AFBC on v7
Alyssa Rosenzweig [Tue, 5 Oct 2021 20:18:22 +0000 (16:18 -0400)]
panfrost: Enable AFBC on v7

The bugs blocking this have been resolved, so flip on AFBC again and get
moar fps.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>

2 years agopanfrost: Decompress for incompatible AFBC formats
Alyssa Rosenzweig [Sat, 16 Oct 2021 23:44:53 +0000 (19:44 -0400)]
panfrost: Decompress for incompatible AFBC formats

AFBC is keyed to the format. Depending on the hardware, we'll get an
Invalid Data Fault or a GPU timeout if we attempt to sample from an
AFBC-compressed RGBA8 texture as R32F (for example).

Fixes Piglit ./bin/arb_texture_view-rendering-formats_gles3 with AFBC.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>

2 years agopanfrost: Add internal afbc_formats
Alyssa Rosenzweig [Sat, 16 Oct 2021 23:45:27 +0000 (19:45 -0400)]
panfrost: Add internal afbc_formats

We need to know the internal (physical) formats used for AFBC of a given
logical format, in order to check format compatibility and determine if
we need to decompress AFBC for conformance.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>

2 years agopanfrost: Workaround ISSUE_TSIX_2033
Alyssa Rosenzweig [Tue, 5 Oct 2021 23:20:03 +0000 (19:20 -0400)]
panfrost: Workaround ISSUE_TSIX_2033

According to mali_kbase, all Bifrost and Valhall GPUs are affected by
issue TSIX_2033. This hardware bug breaks the INTERSECT frame shader
mode when forcing clean_tile_writes. What does that mean?

The hardware considers a tile "clean" if it has been cleared but not
drawn to. Setting clean_tile_write forces the hardware to write back
such "clean" tiles to main memory.

Bifrost hardware supports frame shaders, which insert a rectangle into
every tile according to a configured rule. Frame shaders are used in
Panfrost to implement tile reloads (i.e. LOAD_OP_LOAD). Two modes are
relevant to the current discussion: ALWAYS, which always inserts a frame
shader, and INTERSECT, which tries to only insert where there is
geometry. Normally, we use INTERSECT for tile reloads as it is more
efficient than ALWAYS-- it allows us to skip reloads of tiles that are
discarded and never written back to memory.

From a software perspective, Panfrost's current logic is correct: if we
clear, we set clean_tile_writes, else we use an INTERSECT frame shader.
There is no software interaction between the two.

Unfortunately, there is a hardware interaction. The hardware forces
clean_tile_writes in certain circumstances when AFBC is used.
Ordinarily, this is a hardware implementation detail and invisible to
software. Unfortunately, this implicit clean tile write is enough to
trigger the hardware bug when using INTERSECT. As such, we need to
detect this case and use ALWAYS instead of INTERSECT for correct
results.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>

2 years agopanfrost: Fix gl_FragColor lowering
Alyssa Rosenzweig [Sat, 16 Oct 2021 20:14:00 +0000 (16:14 -0400)]
panfrost: Fix gl_FragColor lowering

The gl_FragColor lowering in the fragment shader depends on the number
of render targets, which can change every set_framebuffer_state.
set_framebuffer_state thus needs to force a rebind of the fragment
shader.

Fixes a regression in Piglit fbo-drawbuffers-none gl_FragColor -auto
-fbo from enabling AFBC on Mali G52.

Fixes: 28ac4d1e005 ("panfrost: Call nir_lower_fragcolor based on key")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13498>

2 years agopanfrost: Remove unused MIDGARD_NO_AFBC quirk
Alyssa Rosenzweig [Tue, 5 Oct 2021 20:09:27 +0000 (16:09 -0400)]
panfrost: Remove unused MIDGARD_NO_AFBC quirk

This is not Midgard-specific and is handled outside of the quirks
infrastructure now.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13497>

2 years agopanfrost,panvk: Use dev->has_afbc instead of quirks
Alyssa Rosenzweig [Tue, 5 Oct 2021 20:05:56 +0000 (16:05 -0400)]
panfrost,panvk: Use dev->has_afbc instead of quirks

This uses the new property for AFBC we've added. The AFBC quirk is
applied only to v4, and we only set dev->has_afbc on v5+ so this is not
a regression. It now respects the hardware-specific AFBC disable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13497>

2 years agopanfrost: Detect implementations support AFBC
Alyssa Rosenzweig [Tue, 5 Oct 2021 20:01:00 +0000 (16:01 -0400)]
panfrost: Detect implementations support AFBC

AFBC is an optional feature on Bifrost. If it is missing, a bit will be
set in the poorly named AFBC_FEATURES register. Check this so we can act
appropriately.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13497>

2 years agoturnip: Drop the assertion about the temporary bit in sync fd imports.
Emma Anholt [Thu, 21 Oct 2021 20:06:38 +0000 (13:06 -0700)]
turnip: Drop the assertion about the temporary bit in sync fd imports.

Khronos's conclusion was that you only need the bit when you want
temporary and there's a choice between temporary and permanent.

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

2 years agogallium/u_blitter: Read MSAA z/s from sampler's .x instead of .y or .z.
Emma Anholt [Tue, 19 Oct 2021 22:36:09 +0000 (15:36 -0700)]
gallium/u_blitter: Read MSAA z/s from sampler's .x instead of .y or .z.

u_format defines depth formats as having depth in .x, mesa/st samples for
depth or stencil in .x (not making use of any other channels).
util_make_fs_blit_zs() looks for depth or stencil in .x.  The MSAA path
was the exception looking for it in .z or .y, which was causing drivers to
need to splat their values out to the other channels.  This should be
better on hardware that can emit shorter messages for sampling just the
first channels.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13446>

2 years agoiris: also dump bo's imported and exported flags
Paulo Zanoni [Tue, 19 Oct 2021 20:13:48 +0000 (13:13 -0700)]
iris: also dump bo's imported and exported flags

My original patch also aligned the columns for better printing, but
Ken's recent suballocation series incorporated those changes. My
original patch was also printing the EXEC_OBJECT_ASYNC flag, but this
is not possible anymore as we don't have the validation list here. But
it's fine since EXEC_OBJECT_ASYNC is conditional on
iris_bo_is_external(), which is true for either exported or imported.

Example output:

BO list (length 13):
[ 0]:   8 (  8) command buffer @ 0xfffffffefffdd000 (system    65536B)  2 refs
[ 1]:   1 (  1) workaround     @ 0xfffffffefffff000 (system     4096B)  3 refs
[ 2]:  14 ( 14) dynamic state  @ 0x00000002fffef000 (system    65536B)  2 refs  write
[ 3]:   0 ( 10) miptree        @ 0xfffffffeffc00000 (system   471104B)  4 refs  write
[ 4]:  15 ( 15) shader kernels @ 0x00000000ffff7000 (system    16384B)  2 refs
[ 5]:   0 ( 13) buffer         @ 0xfffffffefe700000 (system  1048576B)  2 refs
[ 6]:   4 (  4) surface state  @ 0x00000001fffef000 (system    65536B)  2 refs
[ 7]:   3 (  3) binder         @ 0x0000000100000000 (system    65536B)  2 refs
[ 8]:  18 ( 18) miptree        @ 0xfffffffeffebd000 (system   524288B)  2 refs  write exported
[ 9]:  11 ( 11) buffer         @ 0xfffffffefe800000 (system 20971520B)  2 refs
[10]:   0 ( 13) buffer         @ 0xfffffffefe600000 (system  1048576B)  2 refs
[11]:  12 ( 12) shader kernels @ 0x00000000ffffb000 (system    16384B)  2 refs
[12]:   5 (  5) buffer         @ 0xfffffffeffffe000 (system     4096B)  2 refs  write

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12654>

2 years agost/mesa: don't crash when draw indirect buffer has no storage
Marek Olšák [Thu, 21 Oct 2021 19:40:20 +0000 (15:40 -0400)]
st/mesa: don't crash when draw indirect buffer has no storage

Fixes: 22f6624ed318e8 - gallium: separate indirect stuff from pipe_draw_info

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13471>

2 years agotu: Expose required VK_FORMAT_FEATURE bits for planar YUV formats
Matt Turner [Wed, 8 Sep 2021 00:32:38 +0000 (17:32 -0700)]
tu: Expose required VK_FORMAT_FEATURE bits for planar YUV formats

Specifically this enables these VK_FORMAT_FEATURE bits:

  VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
  VK_FORMAT_FEATURE_TRANSFER_DST_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
  VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
  VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT

Fixes the following tests:
  dEQP-VK.api.info.format_properties.g8_b8_r8_3plane_420_unorm
  dEQP-VK.api.info.format_properties.g8_b8r8_2plane_420_unorm
  dEQP-VK.api.info.image_format_properties.2d.optimal.g8_b8_r8_3plane_420_unorm
  dEQP-VK.api.info.image_format_properties.2d.optimal.g8_b8r8_2plane_420_unorm

Additionally allows 339 tests in dEQP-VK.ycbcr.* to go from Skip to
Pass.

[ Connor: Fake support for 3-plane formats, fixup modifiers path ]

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

2 years agoturnip: enable UBWC for NV12
Jonathan Marek [Sun, 20 Sep 2020 00:24:07 +0000 (20:24 -0400)]
turnip: enable UBWC for NV12

Use the special format for accessing the Y plane of UBWC-enabled NV12, and
enable UBWC for NV12.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6792>

2 years agotu: Emit GRAS_LRZ_MRT_BUF_INFO_0
Connor Abbott [Tue, 19 Oct 2021 15:52:22 +0000 (17:52 +0200)]
tu: Emit GRAS_LRZ_MRT_BUF_INFO_0

The blob seems to always emit this, even though it seems to only be used
when rendering to the special planar formats (which we only do in the
blit path). Based on the LRZ prefix it might used in other cases though.

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

2 years agofreedreno/a6xx: Rename GRAS_2D_BLIT_INFO
Connor Abbott [Tue, 19 Oct 2021 15:36:50 +0000 (17:36 +0200)]
freedreno/a6xx: Rename GRAS_2D_BLIT_INFO

It's not actually used for 2d blits, it's supposed to mirror
RB_MRT_BUF_INFO[0].COLOR_FORMAT and seems to be used only when rendering
to the special planar formats, although the blob name seems to suggest
it's connected to LRZ.

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

2 years agofreedreno/layout: Fix the UBWC block size for the Y plane
Jonathan Marek [Sat, 19 Sep 2020 19:56:40 +0000 (15:56 -0400)]
freedreno/layout: Fix the UBWC block size for the Y plane

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6792>

2 years agoutil/format: Add PIPE_FORMAT_Y8_UNORM as an "other" layout format
Matt Turner [Wed, 1 Sep 2021 23:03:39 +0000 (16:03 -0700)]
util/format: Add PIPE_FORMAT_Y8_UNORM as an "other" layout format

freedreno has a different layout for tiled Y8 planes from normal R8
textures, so we need to be able to talk about them separately.

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

2 years agov3dv: refactor TFU jobs
Iago Toral Quiroga [Fri, 22 Oct 2021 09:29:44 +0000 (11:29 +0200)]
v3dv: refactor TFU jobs

We had an implementation for image copies and another for buffer to
image copies. Refactor the code so we have a single implementation
of this.

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

2 years agoiris: clear bos_written when resetting a batch
Tapani Pälli [Thu, 21 Oct 2021 08:02:34 +0000 (11:02 +0300)]
iris: clear bos_written when resetting a batch

This fixes dEQP-EGL.functional.sharing.gles2.multithread.* tests that
are hitting: "iris: Failed to submit batchbuffer: Invalid argument"
error.

v2: clear on reset rather than clear 'on-the-fly' (Kenneth Graunke)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5537
Fixes: e4c3d3efc7a ("iris: Defer construction of the validation (exec_object2) list")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13464>

2 years agoradv: re-emit prolog inputs when the nontrivial divisors state changed
Samuel Pitoiset [Fri, 15 Oct 2021 12:27:38 +0000 (14:27 +0200)]
radv: re-emit prolog inputs when the nontrivial divisors state changed

If the application first uses nontrivial divisors, the driver emits
the vertex shader VA to the upload BO rather than directly via the
user SGPRs locations. But, if the vertex input dynamic state changes,
the driver might select a different VS prolog that no longer needs
nontrivial divisors.

In this case, the driver needs to re-emit the prolog inputs because
otherwise the VS prolog will jump to the PC that is emitted via the
user SGPR locations, and the previous one was somewhere in the
upload BO...

This fixes a GPU hang with Bioshock and Zink.

Fixes: d9c7a175424 ("radv: enable VK_EXT_vertex_input_dynamic_state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13377>

2 years agoradv,aco: decouple shader_info/options from radv_shader_args
Samuel Pitoiset [Fri, 8 Oct 2021 14:14:15 +0000 (16:14 +0200)]
radv,aco: decouple shader_info/options from radv_shader_args

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

2 years agocrocus: Replace devinfo->ver[x10] checks with GFX_VER[x10]
Kenneth Graunke [Thu, 21 Oct 2021 23:38:56 +0000 (16:38 -0700)]
crocus: Replace devinfo->ver[x10] checks with GFX_VER[x10]

These files are compiled per-generation, so we can just use the #define
instead of the actual field dereference to allow the compiler to dead
code eliminate whole paths.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13475>

2 years agobroadcom/compiler: fix assert that current instruction must be in current block
Iago Toral Quiroga [Thu, 21 Oct 2021 09:35:28 +0000 (11:35 +0200)]
broadcom/compiler: fix assert that current instruction must be in current block

This was not considering the possibility that the driver has called
nir_before_block() or nir_after_block() to update the cursor, in which
case the cursor link points to the instruction list header and not
to an actual instruction.

Fixes incorrect debug-assert crash in:
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy

Fixes: 265515fa62 ("broadcom/compiler: check instruction belongs to current block")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13467>

2 years agointel: Drop Tigerlake revision 0 workarounds
Kenneth Graunke [Thu, 7 Oct 2021 19:38:03 +0000 (12:38 -0700)]
intel: Drop Tigerlake revision 0 workarounds

Tigerlake revision 0 is an early stepping that should not be used in
production anywhere, so this code was only used for hardware bringup.
We can drop the unnecessary workarounds.  This also keeps them from
triggering on early steppings of other Gfx12 parts.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13266>

2 years agomesa: discard draws with count=0 to decrease overhead
Marek Olšák [Tue, 19 Oct 2021 02:25:25 +0000 (22:25 -0400)]
mesa: discard draws with count=0 to decrease overhead

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

2 years agoiris: Refactor the assignment to possible_usages
Nanley Chery [Tue, 20 Jul 2021 18:46:51 +0000 (11:46 -0700)]
iris: Refactor the assignment to possible_usages

* Make the outer if-ladder dependent on the has_* variables.
* Make the possible_usages assignments happen at the same nesting level.
* Move the combined HIZ/MCS assert closer to relevant if-else blocks.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11960>

2 years agoiris: Set DISABLE_AUX_BIT for AUX_USAGE_NONE modifiers
Nanley Chery [Mon, 19 Jul 2021 17:16:56 +0000 (10:16 -0700)]
iris: Set DISABLE_AUX_BIT for AUX_USAGE_NONE modifiers

This avoids unnecessary surface padding on TGL+.

Also, drop some of the logic to handle modifiers in
iris_resource_configure_aux as the bit now causes it to be handled
implicitly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11960>

2 years agoiris: Disable the MC_CCS modifier with norbc
Nanley Chery [Tue, 7 Sep 2021 15:08:32 +0000 (08:08 -0700)]
iris: Disable the MC_CCS modifier with norbc

We generally try to disable CCS whenever the norbc debug flag is set.
Also, this enables simplifying iris_resource_configure_aux later on.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11960>

2 years agoiris: Convert some mod_info checks to asserts
Nanley Chery [Wed, 25 Aug 2021 17:34:20 +0000 (10:34 -0700)]
iris: Convert some mod_info checks to asserts

Depth and multisample images aren't supported with modifiers. So,
instead of checking for the absence of modifiers before adding HiZ or
MCS, simply assert that they aren't present at a more convenient time.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11960>

2 years agofreedreno/ir3: Fix validation of subgroup macros
Rob Clark [Sun, 10 Oct 2021 16:33:46 +0000 (09:33 -0700)]
freedreno/ir3: Fix validation of subgroup macros

They don't need to enforce that src types are all the same.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Get req_local_mem from pipe_compute_state
Rob Clark [Sun, 5 Sep 2021 19:35:06 +0000 (12:35 -0700)]
freedreno/ir3: Get req_local_mem from pipe_compute_state

mesa/st initializes req_local_mem to shader->info.shared_size.  But for
clover the shared size doesn't come from the shader.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Add ihadd/uhadd
Rob Clark [Sun, 29 Aug 2021 15:39:39 +0000 (08:39 -0700)]
freedreno/ir3: Add ihadd/uhadd

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Add wide load/store lowering
Rob Clark [Sat, 16 Oct 2021 17:30:44 +0000 (10:30 -0700)]
freedreno/ir3: Add wide load/store lowering

Lower load/store for vectors wider than 4.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Fix reg size validation
Rob Clark [Tue, 24 Aug 2021 00:18:55 +0000 (17:18 -0700)]
freedreno/ir3: Fix reg size validation

8b types also live in half-regs

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Fix load/store_global_ir3 type
Rob Clark [Tue, 24 Aug 2021 00:18:53 +0000 (17:18 -0700)]
freedreno/ir3: Fix load/store_global_ir3 type

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: 8bit fixes
Rob Clark [Tue, 24 Aug 2021 00:18:50 +0000 (17:18 -0700)]
freedreno/ir3: 8bit fixes

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: 16b bools
Rob Clark [Thu, 9 Sep 2021 17:38:48 +0000 (10:38 -0700)]
freedreno/ir3: 16b bools

A create_immed_for_instr() type thing could be useful to make the immed
type match other src(s) for instruction..

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Deal with zero-source instructions
Rob Clark [Sat, 9 Oct 2021 18:16:29 +0000 (11:16 -0700)]
freedreno/ir3: Deal with zero-source instructions

Needed by the next patch, which starts treating bools as 16bit exposing
a bug that was previously accidentially hidden for instructions like
ELECT_MACRO.  Needed for next patch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno: Fix set_global_binding
Rob Clark [Sun, 22 Aug 2021 17:31:44 +0000 (10:31 -0700)]
freedreno: Fix set_global_binding

The gallium interface is a bit awkward, but pointer sizes are actually
64b despite what the API suggests.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Move lower_idiv_options
Rob Clark [Sun, 22 Aug 2021 15:27:54 +0000 (08:27 -0700)]
freedreno/ir3: Move lower_idiv_options

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Add support for load_kernel_input
Rob Clark [Sun, 8 Aug 2021 20:31:54 +0000 (13:31 -0700)]
freedreno/ir3: Add support for load_kernel_input

Used for function arguments to compute kernels (ie. OpenCL).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: implement load_work_dim intrinsic
Rob Clark [Thu, 8 Mar 2018 19:22:45 +0000 (14:22 -0500)]
freedreno/ir3: implement load_work_dim intrinsic

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: vec8+vec16 support
Rob Clark [Sun, 8 Aug 2021 19:45:58 +0000 (12:45 -0700)]
freedreno/ir3: vec8+vec16 support

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno: implement set_compute_state()
Rob Clark [Tue, 1 May 2018 20:03:58 +0000 (16:03 -0400)]
freedreno: implement set_compute_state()

This interface should really go away, but for now just implement it
to directly update constant state (ie. what clover *should* be doing
instead)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Handle MESA_SHADER_KERNEL
Rob Clark [Sun, 8 Aug 2021 19:33:24 +0000 (12:33 -0700)]
freedreno/ir3: Handle MESA_SHADER_KERNEL

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno: Skip built-in shaders for clover
Rob Clark [Sun, 8 Aug 2021 19:14:55 +0000 (12:14 -0700)]
freedreno: Skip built-in shaders for clover

Avoids assert:

  ../src/compiler/glsl_types.cpp:1134: static const glsl_type *glsl_type::get_array_instance(const glsl_type *, unsigned int, unsigned int): Assertion `glsl_type_users > 0' failed.

caused by us trying to compile built-in shaders (ie. clear, gmem<->mem,
etc) before clover has initialized glsl_types.  But we don't need these
shaders for compute-only contexts.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agoisaspec: inherite parent's bitset gpu gen requirements
Danylo Piliaiev [Mon, 1 Feb 2021 10:37:49 +0000 (12:37 +0200)]
isaspec: inherite parent's bitset gpu gen requirements

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agoisaspec: Fix gpu_id for default_options
Rob Clark [Thu, 21 Oct 2021 18:58:08 +0000 (11:58 -0700)]
isaspec: Fix gpu_id for default_options

We forgot to set this.  It starts to matter in the next patch, otherwise
pre-pass to detect branch targets (needed for backwards jumps/branches)
will not work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: use stg.a/ldg.a only if offset is reg or doesn't fit
Danylo Piliaiev [Fri, 8 Oct 2021 15:36:43 +0000 (18:36 +0300)]
freedreno/ir3: use stg.a/ldg.a only if offset is reg or doesn't fit

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Add load/store_global lowering
Rob Clark [Sun, 22 Aug 2021 16:53:56 +0000 (09:53 -0700)]
freedreno/ir3: Add load/store_global lowering

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: set proper dst size for {store,load}_{global,shared}_ir3
Danylo Piliaiev [Fri, 8 Oct 2021 11:40:52 +0000 (14:40 +0300)]
freedreno/ir3: set proper dst size for {store,load}_{global,shared}_ir3

We want to pass 64b variables.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: disallow immediate addr/offset for ldg/ldg.a
Danylo Piliaiev [Fri, 8 Oct 2021 15:30:11 +0000 (18:30 +0300)]
freedreno/ir3: disallow immediate addr/offset for ldg/ldg.a

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: Lower 64b phis
Rob Clark [Sun, 3 Oct 2021 16:36:07 +0000 (09:36 -0700)]
freedreno/ir3: Lower 64b phis

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agoir3/freedreno: add 64b undef lowering
Danylo Piliaiev [Mon, 11 Oct 2021 10:32:29 +0000 (13:32 +0300)]
ir3/freedreno: add 64b undef lowering

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agofreedreno/ir3: 64b intrinsic lowering
Rob Clark [Sun, 22 Aug 2021 16:21:03 +0000 (09:21 -0700)]
freedreno/ir3: 64b intrinsic lowering

Both for OpenCL and VK_KHR_buffer_device_address

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agonir/lower_amul: do not lower 64bit amul to imul24
Danylo Piliaiev [Tue, 26 Jan 2021 10:11:44 +0000 (12:11 +0200)]
nir/lower_amul: do not lower 64bit amul to imul24

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>

2 years agointel/compiler: Set correct cache policy for A64 byte scattered read
Sagar Ghuge [Wed, 20 Oct 2021 17:03:07 +0000 (10:03 -0700)]
intel/compiler: Set correct cache policy for A64 byte scattered read

This doesn't impact any performance since the previous typo value
matches the current cache control value.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13458>

2 years agoamd/addrlib: cosmetic addrlib update
Marek Olšák [Wed, 22 Sep 2021 07:28:33 +0000 (03:28 -0400)]
amd/addrlib: cosmetic addrlib update

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13459>

2 years agoamd/addrlib: change how the license is formatted to match internal tree
Marek Olšák [Wed, 22 Sep 2021 07:03:47 +0000 (03:03 -0400)]
amd/addrlib: change how the license is formatted to match internal tree

It's the same MIT license.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13459>

2 years agofrontends/va/av1: handle multiple slice params
Sajeesh Sidharthan [Wed, 20 Oct 2021 16:00:38 +0000 (21:30 +0530)]
frontends/va/av1: handle multiple slice params

Multiple slice params in a single vaRenderPicture function call
is not handled. This patch will fix overwriting slice params
when multiple slice params received in one buffer.

Change-Id: I880df5bc35dfbd64382a178074482548882ee4af
Signed-off-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13463>

2 years agoaco: fix loading 64-bit inputs with fragment shaders
Samuel Pitoiset [Tue, 19 Oct 2021 07:16:20 +0000 (09:16 +0200)]
aco: fix loading 64-bit inputs with fragment shaders

Fixes a bunch of 64-bit IO tests with piglit and Zink.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13454>

2 years agobroadcom/compiler: disallow tsy barrier in thrsw delay slots
Iago Toral Quiroga [Thu, 21 Oct 2021 10:06:16 +0000 (12:06 +0200)]
broadcom/compiler: disallow tsy barrier in thrsw delay slots

A TSY barrier becomes effective at the point of the next thread switch,
so if we have one coming after a previous thread switch we need to
be careful not to emit it in its delay slots, or we would be effectively
moving the barrier earlier than intended.

Fixes simulator assert crash in:
dEQP-VK.graphicsfuzz.two-for-loops-with-barrier-function

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

2 years agoturnip: Make copy_format() and tu6_plane_format() return pipe_format
Emma Anholt [Tue, 5 Oct 2021 22:24:31 +0000 (15:24 -0700)]
turnip: Make copy_format() and tu6_plane_format() return pipe_format

[ Connor: Keep the argument to copy_format() a VkFormat, fold in
  plane_format() conversion. ]

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

2 years agoutil: Move freedreno's snorm-to-unorm to util/, adding remaining cases.
Emma Anholt [Wed, 13 Oct 2021 23:39:05 +0000 (16:39 -0700)]
util: Move freedreno's snorm-to-unorm to util/, adding remaining cases.

I want it in turnip too.

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

2 years agoturnip: Switch format_to_ifmt() to take a pipe_format.
Emma Anholt [Wed, 6 Oct 2021 04:06:13 +0000 (21:06 -0700)]
turnip: Switch format_to_ifmt() to take a pipe_format.

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

2 years agoturnip: Switch tu6_format_color() to a pipe_format.
Emma Anholt [Wed, 6 Oct 2021 03:55:21 +0000 (20:55 -0700)]
turnip: Switch tu6_format_color() to a pipe_format.

To handle Y8 specially, we want a PIPE_FORMAT instead of VK_FORMAT.  There
are some redundant vk-to-pipe conversions, but they're going to go away
shortly.

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

2 years agoturnip: Switch tu6_format_texture() to a pipe_format.
Emma Anholt [Wed, 6 Oct 2021 03:46:54 +0000 (20:46 -0700)]
turnip: Switch tu6_format_texture() to a pipe_format.

To handle Y8 specially, we want a PIPE_FORMAT instead of VK_FORMAT.

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

2 years agotu/clear_blit: Move around copy_format()/tu6_plane_format()
Connor Abbott [Fri, 15 Oct 2021 09:38:43 +0000 (11:38 +0200)]
tu/clear_blit: Move around copy_format()/tu6_plane_format()

We want these functions to take a Vulkan format and return a
pipe_format, but tu6_plane_format() was getting redundantly called on
the result of copy_format() and copy_format() was also getting called
twice with image to image copies. Pull these functions further up the
call chain so that they're only called once.

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

2 years agov3dv: enable Vulkan 1.1
Iago Toral Quiroga [Tue, 7 Sep 2021 06:06:27 +0000 (08:06 +0200)]
v3dv: enable Vulkan 1.1

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

2 years agoci/piglit-runner: Fix funny indentation of the piglit-runner command.
Emma Anholt [Thu, 14 Oct 2021 21:15:18 +0000 (14:15 -0700)]
ci/piglit-runner: Fix funny indentation of the piglit-runner command.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Move more non-suite logic under the non-suite 'if'.
Emma Anholt [Thu, 14 Oct 2021 21:05:20 +0000 (14:05 -0700)]
ci/deqp-runner: Move more non-suite logic under the non-suite 'if'.

Changing these variables won't do anything for you otherwise.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Don't start GPU hang detection for making junit results.
Emma Anholt [Thu, 14 Oct 2021 21:02:40 +0000 (14:02 -0700)]
ci/deqp-runner: Don't start GPU hang detection for making junit results.

It's just CPU-side post-processing, not running tests.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Drop LD_LIBRARY_PATH=/usr/local for libkms workaround.
Emma Anholt [Thu, 14 Oct 2021 20:58:32 +0000 (13:58 -0700)]
ci/deqp-runner: Drop LD_LIBRARY_PATH=/usr/local for libkms workaround.

deqp hasn't been linking against that in quite some time.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Move remaining asan runs to --env LD_PRELOAD=
Emma Anholt [Mon, 11 Oct 2021 23:07:23 +0000 (16:07 -0700)]
ci/deqp-runner: Move remaining asan runs to --env LD_PRELOAD=

This should improve their reliability and speed a little by getting
deqp-runner off of asan.  This removes the last jobs setting
TEST_LD_PRELOAD, so remove passing that variable around from other
scripts.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Drop silly CSV env vars.
Emma Anholt [Tue, 12 Oct 2021 17:37:43 +0000 (10:37 -0700)]
ci/deqp-runner: Drop silly CSV env vars.

One was unused, the other was used once.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Use new deqp-runner's built-in renderer/version checks.
Emma Anholt [Mon, 11 Oct 2021 23:27:25 +0000 (16:27 -0700)]
ci/deqp-runner: Use new deqp-runner's built-in renderer/version checks.

This is prettier in the log files, less shell code, and for non-suite mode
adds checking that the driver has the right git sha1.  Also, no need for
suites to have a DEQP_VER to say which dEQP we should run for the renderer
check.

The version checks can help us make sure that GL version exposed doesn't
accidentally regress, and the ".*git" checks that we're using a git
version of Mesa rather than something that snuck in through distro
packages.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Simplify the --jobs argument setup.
Emma Anholt [Mon, 11 Oct 2021 23:03:47 +0000 (16:03 -0700)]
ci/deqp-runner: Simplify the --jobs argument setup.

We can use the general "how parallel should we go on this runner?" env var
and save a bunch of massaging env var names.  Fixes how PIGLIT_PARALLEL
looked like it was useful but actually wasn't passed through to HW
runners.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoci/deqp-runner: Drop SUMMARY_LIMIT env var.
Emma Anholt [Mon, 11 Oct 2021 23:02:50 +0000 (16:02 -0700)]
ci/deqp-runner: Drop SUMMARY_LIMIT env var.

Nobody uses it any more, and you could just put it in DEQP_OPTIONS.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>

2 years agoradv: Fix memory leak on error path.
Vinson Lee [Mon, 18 Oct 2021 02:55:54 +0000 (19:55 -0700)]
radv: Fix memory leak on error path.

Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable prolog going out of scope leaks the storage it points to

Fixes: 80841196b2d ("radv: implement dynamic vertex input state using vertex shader prologs")
Suggested-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13402>

2 years agoac/rgp: remove useless code related to GFX6-7
Samuel Pitoiset [Wed, 20 Oct 2021 07:09:04 +0000 (09:09 +0200)]
ac/rgp: remove useless code related to GFX6-7

RGP only supports GFX8+. RADV doesn't allow SQTT on < GFX8 and
RadeonSI only allows it on GFX9+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13451>

2 years agoradv: add an assertion to prevent GPU hangs when VRS isn't supported
Samuel Pitoiset [Thu, 14 Oct 2021 14:21:29 +0000 (16:21 +0200)]
radv: add an assertion to prevent GPU hangs when VRS isn't supported

Just hit this case with a buggy CTS test.

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

2 years agoutil: Move test sources to tests/ directory
Caio Marcelo de Oliveira Filho [Thu, 21 Oct 2021 03:53:24 +0000 (20:53 -0700)]
util: Move test sources to tests/ directory

Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425>

2 years agoutil: Convert sparse array multithread test to use gtest
Caio Marcelo de Oliveira Filho [Tue, 19 Oct 2021 16:51:59 +0000 (09:51 -0700)]
util: Convert sparse array multithread test to use gtest

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425>

2 years agoutil: Convert roundeven_test to use gtest
Caio Marcelo de Oliveira Filho [Tue, 19 Oct 2021 16:34:45 +0000 (09:34 -0700)]
util: Convert roundeven_test to use gtest

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425>

2 years agoutil: Convert rb_tree_test to gtest
Caio Marcelo de Oliveira Filho [Tue, 19 Oct 2021 16:19:27 +0000 (09:19 -0700)]
util: Convert rb_tree_test to gtest

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425>