platform/upstream/mesa.git
14 months agoci/lava: Fix last section in job submitter
Guilherme Gallo [Thu, 27 Apr 2023 21:47:24 +0000 (18:47 -0300)]
ci/lava: Fix last section in job submitter

It only happens after the LogFollower cleanup (__exit__ method)

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22870>

14 months agoci/lava: Bypass arg list to print_log function
Guilherme Gallo [Mon, 15 May 2023 22:39:00 +0000 (19:39 -0300)]
ci/lava: Bypass arg list to print_log function

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22870>

14 months agomesa/program_cache: remove unused shader-cache functions
Erik Faye-Lund [Fri, 28 Apr 2023 09:04:32 +0000 (11:04 +0200)]
mesa/program_cache: remove unused shader-cache functions

These are no longer in use, so let's get rid of them.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-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/22755>

14 months agomesa/main: compile ff_fragment_shader as c-code
Erik Faye-Lund [Fri, 28 Apr 2023 09:21:30 +0000 (11:21 +0200)]
mesa/main: compile ff_fragment_shader as c-code

The reason this used to be C++ code, was because it needed ir_builder.
We no longer need that, so let's move this to C-code instead. This makes
some details a bit more straight-forward.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-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/22755>

14 months agomesa/main: ff-fragshader to nir
Erik Faye-Lund [Tue, 18 Apr 2023 20:05:28 +0000 (22:05 +0200)]
mesa/main: ff-fragshader to nir

There's little point in emitting GLSL IR for the fixed-function fragment
shaders, when we can emit NIR directly instead.

This simplifies things a bit, and makes the fixed-function vertex and
fragment shaders look a lot more alike.

The reason the old code did the splats, was that TEXENV_SRC_ZERO and
TEXENV_SRC_ONE returned scalars. I decided to keep it vector, and let
the nir optimization passes clean this up instead when needed, as that
keeps the code a bit more straight forward.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-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/22755>

14 months agocompiler/nir: move find_state_var to common code
Erik Faye-Lund [Thu, 4 May 2023 06:20:41 +0000 (08:20 +0200)]
compiler/nir: move find_state_var to common code

We're about to need this in another place, so let's move it to common
nir code, and clean up the name a bit.

Acked-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/22755>

14 months agomesa/st: allow using nir for ff-fragment shaders
Erik Faye-Lund [Tue, 18 Apr 2023 20:05:28 +0000 (22:05 +0200)]
mesa/st: allow using nir for ff-fragment shaders

This is similar to what we do for ff-vertex shaders.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-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/22755>

14 months agomesa/st: refactor st_translate_fragment_program
Erik Faye-Lund [Fri, 28 Apr 2023 10:58:26 +0000 (12:58 +0200)]
mesa/st: refactor st_translate_fragment_program

This makes it look more like st_translate_vertex_program, which is doing
the same thing for vertex-shaders.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-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/22755>

14 months agomesa/main: clean up white-space in ff_fragment_shader.cpp
Erik Faye-Lund [Mon, 17 Apr 2023 21:47:23 +0000 (23:47 +0200)]
mesa/main: clean up white-space in ff_fragment_shader.cpp

We're about to change this, so let's clean this up first!

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-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/22755>

14 months agomeson: remove needless c++17-overrides
Erik Faye-Lund [Tue, 16 May 2023 09:15:32 +0000 (11:15 +0200)]
meson: remove needless c++17-overrides

C++17 is the project-wide default since f9057cea517 ("fix(FTBFS):
meson: raise C++ standard to C++17"), so let's drop these local
overrides.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23048>

14 months agopvr: fix array overflow in pvr_device_tile_buffer_ensure_cap()
Frank Binns [Wed, 17 May 2023 14:53:32 +0000 (15:53 +0100)]
pvr: fix array overflow in pvr_device_tile_buffer_ensure_cap()

The function didn't properly handle the case where the requested capacity was
less than the existing capacity. This led to the loop limit being some huge
number and it writing past the end of the 'buffers' array.

Partially fixes:
  dEQP-VK.renderpass.suballocation.multisample_resolve.r16g16b16a16_unorm
    .max_attachments_8_samples_2

The test no longer hangs, but segfaults instead.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23104>

14 months agoradv: reserve cmdbuf space in radv_flush_gfx2ace_semaphore()
Samuel Pitoiset [Tue, 16 May 2023 12:38:55 +0000 (14:38 +0200)]
radv: reserve cmdbuf space in radv_flush_gfx2ace_semaphore()

Fixes an assertion with test_amplification_shader in vkd3d-proton.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23057>

14 months agoci: rework vkd3d-proton runner and fix detecting failures
Samuel Pitoiset [Tue, 16 May 2023 11:37:41 +0000 (13:37 +0200)]
ci: rework vkd3d-proton runner and fix detecting failures

The script returned 0 (aka succcess) for assertions or segmentation
faults. Found this after introducing a regression that caused a
segfault in vkd3d with vk-cts-image but not with Mesa CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23057>

14 months agoci: stop using the hang-detection tool for vkd3d-proton
Samuel Pitoiset [Tue, 16 May 2023 12:53:19 +0000 (14:53 +0200)]
ci: stop using the hang-detection tool for vkd3d-proton

It's no longer used for deqp-runner as well, and it's not really
useful for us because we can detect GPU hangs differently. It also
prevents returning the error code from vkd3d-proton.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23057>

14 months agoci,radv: use drm-shim instead of the null winsys for radv-fossils
Samuel Pitoiset [Wed, 17 May 2023 06:39:23 +0000 (08:39 +0200)]
ci,radv: use drm-shim instead of the null winsys for radv-fossils

Only RADV uses fossilize-runner.sh, so hardcoding LD_PRELOAD is fine.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23072>

14 months agoci: build drm-shim in debian-testing
Samuel Pitoiset [Wed, 17 May 2023 07:30:48 +0000 (09:30 +0200)]
ci: build drm-shim in debian-testing

This will be needed by RADV for using AMDGPU drm-shim.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23072>

14 months agoamd/drm-shim: update README about which file to modify
Samuel Pitoiset [Wed, 17 May 2023 07:53:48 +0000 (09:53 +0200)]
amd/drm-shim: update README about which file to modify

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23072>

14 months agoamd/drm-shim: add bonaire
Samuel Pitoiset [Wed, 17 May 2023 08:13:14 +0000 (10:13 +0200)]
amd/drm-shim: add bonaire

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23072>

14 months agoamd/drm-shim: add pitcairn
Samuel Pitoiset [Wed, 17 May 2023 08:06:22 +0000 (10:06 +0200)]
amd/drm-shim: add pitcairn

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23072>

14 months agoamd/drm-shim: add navi21
Samuel Pitoiset [Wed, 17 May 2023 07:52:35 +0000 (09:52 +0200)]
amd/drm-shim: add navi21

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23072>

14 months agoanv/ci: Add tests for video formats to the failing tests.
Hyunjun Ko [Tue, 16 May 2023 08:45:03 +0000 (17:45 +0900)]
anv/ci: Add tests for video formats to the failing tests.

This should be removed once the issue is resolved.
(https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4280)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv: enable the video h265 decode extension.
Hyunjun Ko [Thu, 30 Mar 2023 07:42:02 +0000 (16:42 +0900)]
anv: enable the video h265 decode extension.

Currently tested on CometLake(gen9) and AlderLake(gen12)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv: support HEVC 10-bit decoding
Hyunjun Ko [Mon, 15 May 2023 08:40:15 +0000 (17:40 +0900)]
anv: support HEVC 10-bit decoding

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv/image: get width/height for each plane of a surface for video decoding.
Hyunjun Ko [Tue, 11 Apr 2023 01:39:53 +0000 (10:39 +0900)]
anv/image: get width/height for each plane of a surface for video decoding.

This is especially for p010 format, which isn't supported for YCbCr
conversion yet.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv: support P010 format for video 10-bit hevc decoding
Hyunjun Ko [Fri, 7 Apr 2023 01:26:12 +0000 (10:26 +0900)]
anv: support P010 format for video 10-bit hevc decoding

Only for video 10-bit hevc decoding, so shouldn't enable such as YCbCr
conversion.

v1. Fix to avoid YCbCr CTS tests for this format.
( Lionel Landwerlin <lionel.g.landwerlin@intel.com> )

v2. Add a flag can_video so we could handle supported video formats
neatly.
( Lionel Landwerlin <lionel.g.landwerlin@intel.com> )

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv: add initial video decode support for h265
Hyunjun Ko [Thu, 30 Mar 2023 06:56:08 +0000 (15:56 +0900)]
anv: add initial video decode support for h265

Tested on CometLake(gen9) and AlderLake(gen12)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv/image: allow VK_IMAGE_CREATE_ALIAS_BIT with a private binding.
Hyunjun Ko [Wed, 12 Apr 2023 05:24:44 +0000 (14:24 +0900)]
anv/image: allow VK_IMAGE_CREATE_ALIAS_BIT with a private binding.

when the image is for video decoding.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv/image: allocate mv storage buffers for h265
Hyunjun Ko [Fri, 24 Mar 2023 05:24:10 +0000 (14:24 +0900)]
anv/image: allocate mv storage buffers for h265

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoanv/image: Add a surface usage bit for video decoding
Hyunjun Ko [Tue, 11 Apr 2023 01:38:10 +0000 (10:38 +0900)]
anv/image: Add a surface usage bit for video decoding

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agovulkan/video: add h265 reference structures and relevant util functions.
Hyunjun Ko [Thu, 23 Mar 2023 05:12:27 +0000 (14:12 +0900)]
vulkan/video: add h265 reference structures and relevant util functions.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agovulkan/video: add to parse h265 slice.
Hyunjun Ko [Thu, 23 Mar 2023 05:09:24 +0000 (14:09 +0900)]
vulkan/video: add to parse h265 slice.

Vulkan spec doesn't provide any interface for slice decoding while some
devices may require them. So we need to keep this inside.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoutil/vl: initialize data/end pointers.
Hyunjun Ko [Tue, 16 May 2023 02:20:58 +0000 (11:20 +0900)]
util/vl: initialize data/end pointers.

Since this util moved to public place it turned out it could cause
a build error on current CI like the following:

../src/util/vl_vlc.h:225:52: error: 'vlc.data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  225 |    assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end);
      |                                                    ^~
../src/util/vl_vlc.h:225:65: error: 'vlc.end' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  225 |    assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end);
      |                                                                 ^~

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agointel/genxml: add a command VD_CONTROL_STATE to gen12/125
Hyunjun Ko [Wed, 26 Apr 2023 00:51:54 +0000 (09:51 +0900)]
intel/genxml: add a command VD_CONTROL_STATE to gen12/125

It's essentially needed to execute hevc decoding on gen12.

Note that we set HCP by default.
 - Command OpCode : VDENC(1), HCP(7), AVP(3)
 - SubOpcode      : HCP(10), VDENC(11)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agointel/genxml: align some fields on gen9/11/12/125 with media driver.
Hyunjun Ko [Mon, 24 Apr 2023 01:49:30 +0000 (10:49 +0900)]
intel/genxml: align some fields on gen9/11/12/125 with media driver.

Most of them are length of each instruction and the rest are
some corrections on specific gens.

v1. Added a default value to DWordLength of each instruction.
( Lionel Landwerlin <lionel.g.landwerlin@intel.com> )

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agointel/genxml: conform some fields to each other gen.
Hyunjun Ko [Fri, 21 Apr 2023 02:16:08 +0000 (11:16 +0900)]
intel/genxml: conform some fields to each other gen.

There are same fields across gens but the existing xmls are not exactly same,
which needs to be fixed.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agointel/genxml: fix num bits of some MOCS fields
Hyunjun Ko [Fri, 21 Apr 2023 01:52:06 +0000 (10:52 +0900)]
intel/genxml: fix num bits of some MOCS fields

Actually the first bit is a bit of protected mask (or reserved)
and the next 6 bits are for MOCS but they are being handled together
currently in isl_device_setup_mocs. So we need to fix some MOCS fields
defined as 6 bits to 7 bits.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>

14 months agoamd/registers: update pitch definitions in descriptors
Marek Olšák [Mon, 15 May 2023 05:27:14 +0000 (01:27 -0400)]
amd/registers: update pitch definitions in descriptors

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

14 months agoac/surface: add ac_surf_config::is_array
Marek Olšák [Mon, 15 May 2023 05:25:43 +0000 (01:25 -0400)]
ac/surface: add ac_surf_config::is_array

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

14 months agoac/surface: fix overridden linear pitch for CPU access
Marek Olšák [Mon, 15 May 2023 05:15:24 +0000 (01:15 -0400)]
ac/surface: fix overridden linear pitch for CPU access

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

14 months agoac/surface: validate overridden pitch for all chips
Marek Olšák [Mon, 15 May 2023 05:12:55 +0000 (01:12 -0400)]
ac/surface: validate overridden pitch for all chips

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

14 months agoac/surface: define LINEAR_PITCH_ALIGNMENT
Marek Olšák [Mon, 15 May 2023 05:10:43 +0000 (01:10 -0400)]
ac/surface: define LINEAR_PITCH_ALIGNMENT

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

14 months agoac/surface: clean up and move the PIPE_CONFIG helper to ac_surface.c
Marek Olšák [Mon, 15 May 2023 05:07:28 +0000 (01:07 -0400)]
ac/surface: clean up and move the PIPE_CONFIG helper to ac_surface.c

This will be used by following commits.

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

14 months agoradeonsi: fix image size calculation in fast clear
Marek Olšák [Mon, 15 May 2023 18:26:08 +0000 (14:26 -0400)]
radeonsi: fix image size calculation in fast clear

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

14 months agoradeonsi: fix sparse image address calculation for large images by using uint64_t
Marek Olšák [Mon, 15 May 2023 16:02:38 +0000 (12:02 -0400)]
radeonsi: fix sparse image address calculation for large images by using uint64_t

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

14 months agoradeonsi: fix image address calculation for large images by using uint64_t
Marek Olšák [Mon, 15 May 2023 16:02:38 +0000 (12:02 -0400)]
radeonsi: fix image address calculation for large images by using uint64_t

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

14 months agoradeonsi: fix SDMA image address calculation for large images by using uint64_t
Marek Olšák [Mon, 15 May 2023 16:01:52 +0000 (12:01 -0400)]
radeonsi: fix SDMA image address calculation for large images by using uint64_t

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

14 months agoradv: fix SDMA image address calculation for large images by using uint64_t
Marek Olšák [Mon, 15 May 2023 16:01:52 +0000 (12:01 -0400)]
radv: fix SDMA image address calculation for large images by using uint64_t

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

14 months agoradv: fix sparse image address calculation for large images by using uint64_t
Marek Olšák [Mon, 15 May 2023 16:00:29 +0000 (12:00 -0400)]
radv: fix sparse image address calculation for large images by using uint64_t

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

14 months agoac/surface: fix address calculation for large images by using uint64_t
Marek Olšák [Mon, 15 May 2023 15:59:43 +0000 (11:59 -0400)]
ac/surface: fix address calculation for large images by using uint64_t

also rename gfx9_surf_level -> gfx9_surf_meta_level

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

14 months agoradeonsi: fix uses_instanceid for merged mono shader stage
Qiang Yu [Thu, 18 May 2023 12:15:17 +0000 (20:15 +0800)]
radeonsi: fix uses_instanceid for merged mono shader stage

prev_shader.info.uses_instanceid is set by si_nir_lower_vs_inputs()
when attribute divisor is used.

Fixes: 894d92995cd ("radeonsi: monolithic VS emit prolog in nir directly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9042
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23101>

14 months agorusticl/device: add cl_khr_integer_dot_product ext
norablackcat [Thu, 18 May 2023 14:05:55 +0000 (08:05 -0600)]
rusticl/device: add cl_khr_integer_dot_product ext

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

14 months agorusticl/kernel: remove nir_lower_pack pass
norablackcat [Thu, 18 May 2023 14:05:44 +0000 (08:05 -0600)]
rusticl/kernel: remove nir_lower_pack pass

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

14 months agorusticl/clc add integer_dot_prod feature macros
norablackcat [Thu, 18 May 2023 14:05:08 +0000 (08:05 -0600)]
rusticl/clc add integer_dot_prod feature macros

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

14 months agorusticl/api: add integer_dot_product api
norablackcat [Thu, 18 May 2023 14:04:12 +0000 (08:04 -0600)]
rusticl/api: add integer_dot_product api

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

14 months agorusticl/types add ::new for cl_dev_idp_accel_props
norablackcat [Thu, 18 May 2023 14:03:29 +0000 (08:03 -0600)]
rusticl/types add ::new for cl_dev_idp_accel_props

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

14 months agoanv: drop duplicate checks when setting the compressed bit
Rohan Garg [Thu, 27 Apr 2023 14:45:39 +0000 (16:45 +0200)]
anv: drop duplicate checks when setting the compressed bit

We need compression tracking for full resolves and at the moment only
CCS_E has full resolves.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22737>

14 months agoaco/optimizer: allow DPP to use VOP3 on GFX11
Georg Lehmann [Tue, 16 May 2023 15:55:57 +0000 (17:55 +0200)]
aco/optimizer: allow DPP to use VOP3 on GFX11

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco: use can_use_input_modifiers helper
Georg Lehmann [Tue, 16 May 2023 15:26:21 +0000 (17:26 +0200)]
aco: use can_use_input_modifiers helper

Foz-DB GFX1100:
Totals from 80 (0.06% of 132657) affected shaders:
CodeSize: 504500 -> 503660 (-0.17%)
Instrs: 95033 -> 94824 (-0.22%)
Latency: 629695 -> 629235 (-0.07%)
InvThroughput: 97105 -> 97008 (-0.10%)
VClause: 1779 -> 1777 (-0.11%)
Copies: 3233 -> 3236 (+0.09%); split: -0.03%, +0.12%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco: use get_operand_size for dpp opt
Georg Lehmann [Tue, 16 May 2023 15:10:57 +0000 (17:10 +0200)]
aco: use get_operand_size for dpp opt

This matters now that v_fma_mixlo_f16/v_fma_mixhi_f16 can use dpp.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco: add helper function for can_use_input_modifiers
Georg Lehmann [Tue, 16 May 2023 15:02:45 +0000 (17:02 +0200)]
aco: add helper function for can_use_input_modifiers

Some instructions have restrictions that can't be expressed with the bitfield.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco/ra: use fmac with DPP/opsel on GFX11
Georg Lehmann [Tue, 16 May 2023 14:32:28 +0000 (16:32 +0200)]
aco/ra: use fmac with DPP/opsel on GFX11

Foz-DB GFX1100:
Totals from 2 (0.00% of 132657) affected shaders:
CodeSize: 8764 -> 8732 (-0.37%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco/ra: use smaller operand stride for VOP3P with DPP
Georg Lehmann [Sat, 13 May 2023 11:00:04 +0000 (13:00 +0200)]
aco/ra: use smaller operand stride for VOP3P with DPP

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco: add withoutVOP3 helper
Georg Lehmann [Sat, 13 May 2023 09:40:35 +0000 (11:40 +0200)]
aco: add withoutVOP3 helper

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco/gfx11: use fmamk/fmaak with opsel
Georg Lehmann [Sat, 13 May 2023 09:25:11 +0000 (11:25 +0200)]
aco/gfx11: use fmamk/fmaak with opsel

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agoaco: introduce helper to swap valu operands with modifiers
Georg Lehmann [Thu, 18 May 2023 08:54:45 +0000 (10:54 +0200)]
aco: introduce helper to swap valu operands with modifiers

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23059>

14 months agogitlab-ci: add capture for i915 error state
Lionel Landwerlin [Wed, 17 May 2023 19:41:51 +0000 (22:41 +0300)]
gitlab-ci: add capture for i915 error state

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23099>

14 months agoci/venus: add missing flakes
David Heidelberg [Thu, 18 May 2023 14:23:54 +0000 (16:23 +0200)]
ci/venus: add missing flakes

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

14 months agoci/gtest-runner: fix results reporting
David Heidelberg [Sun, 7 May 2023 00:46:30 +0000 (02:46 +0200)]
ci/gtest-runner: fix results reporting

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

14 months agoci/amd: add radeonsi-raven-va-full job to cover all VA-API tests
David Heidelberg [Sun, 7 May 2023 00:24:22 +0000 (02:24 +0200)]
ci/amd: add radeonsi-raven-va-full job to cover all VA-API tests

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

14 months agoci/amd: update VA-API expectations
David Heidelberg [Sat, 6 May 2023 23:21:26 +0000 (01:21 +0200)]
ci/amd: update VA-API expectations

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

14 months agoci/gtest: improve the runner script
David Heidelberg [Sat, 6 May 2023 23:17:43 +0000 (01:17 +0200)]
ci/gtest: improve the runner script

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

14 months agoci: update libva to 2.18.1
David Heidelberg [Sat, 6 May 2023 20:03:07 +0000 (22:03 +0200)]
ci: update libva to 2.18.1

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

14 months agoci/rules: radeonsi VAAPI rules should include also VA-API targets
David Heidelberg [Sat, 6 May 2023 20:04:56 +0000 (22:04 +0200)]
ci/rules: radeonsi VAAPI rules should include also VA-API targets

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

14 months agoci/amd: re-enable VA-API testing
David Heidelberg [Wed, 3 May 2023 09:43:27 +0000 (11:43 +0200)]
ci/amd: re-enable VA-API testing

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

14 months agonir: Fix incorrect comment
Alyssa Rosenzweig [Tue, 16 May 2023 14:10:23 +0000 (10:10 -0400)]
nir: Fix incorrect comment

We have 1-bit bools these days.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23107>

14 months agonir: Remove stale TODOs
Alyssa Rosenzweig [Tue, 16 May 2023 14:09:36 +0000 (10:09 -0400)]
nir: Remove stale TODOs

If nobody has added def-use lists for registers in all this time, it's probably
because we don't want them after all ;)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23107>

14 months agopvr: Return VkResult from winsys buffer_map operation
Matt Coster [Fri, 28 Apr 2023 13:57:26 +0000 (14:57 +0100)]
pvr: Return VkResult from winsys buffer_map operation

This allows VK_ERROR_MEMORY_MAP_FAILED to propagate correctly.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Assorted cleanup
Matt Coster [Thu, 27 Apr 2023 15:21:07 +0000 (16:21 +0100)]
pvr: Assorted cleanup

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Use common physical device enumeration
Matt Coster [Tue, 9 May 2023 08:57:14 +0000 (09:57 +0100)]
pvr: Use common physical device enumeration

The PowerVR IP does not contain display hardware - this means it is
always necessary to open two separate devices for render and display.
The try_create_for_drm callback is not suitable for this configuration,
so we use the enumerate callback instead.

The previous implementation did not check that the discovered display
device was compatible with the render device - this is corrected by
unifying the compatibility lists into pvr_drm_configs.

The pvr driver is not currently supported on systems which contain
multiple compatible render or display devices, so the enumerate callback
implementation returns the first discovered render device and its
compatible display device.

This change also removes the workaround for drmGetDevices2() required
after libdrm commit 8cb12a2528d795c45bba5f03b3486b4040fb0f45. The
upstream fix has been in releases of libdrm for over a year now, and
mesa requires reasonably a recent version which is new enough to
contain it.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Rename primary_{device,fd,path} to display_*
Matt Coster [Thu, 11 May 2023 11:13:15 +0000 (12:13 +0100)]
pvr: Rename primary_{device,fd,path} to display_*

This makes it explicit that primary_fd is NOT just a handle to the
primary node on render_fd - rather it's a handle to the primary node
on a separate display device.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Drop pdevice from pvr_physical_device_get_supported_extensions()
Matt Coster [Thu, 27 Apr 2023 15:14:46 +0000 (16:14 +0100)]
pvr: Drop pdevice from pvr_physical_device_get_supported_extensions()

This parameter doesn't make a lot of sense - it's currently unused, but
it can never be valid anyway since the return of this function is used
in the early initialization of pvr_physical_device.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Squeeze fd handling into winsys layer
Matt Coster [Thu, 27 Apr 2023 14:49:08 +0000 (15:49 +0100)]
pvr: Squeeze fd handling into winsys layer

This sets us up to make use of the common physical device initialization
code.

As well as lifting the fd handles out of the implementations, this
pushes creation and destruction of the fds into the winsys layer. In
order for this to make sense, the winsys object is now created *before*
each pvr_device or pvr_physical_device. If there's an error setting up
the winsys instance, there's no point in continuing to create either
one.

Also lifts alloc to the winsys layer since there's nothing special about
it in either implementation.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Fix incorrect error handling in pvr_render_ctx_switch_init()
Matt Coster [Thu, 27 Apr 2023 14:36:01 +0000 (15:36 +0100)]
pvr: Fix incorrect error handling in pvr_render_ctx_switch_init()

Partially fixes: dEQP-VK.api.device_init
  .create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Fix incorrect error return in pvr_ctx_sr_programs_setup()
Matt Coster [Thu, 27 Apr 2023 14:35:42 +0000 (15:35 +0100)]
pvr: Fix incorrect error return in pvr_ctx_sr_programs_setup()

Partially fixes: dEQP-VK.api.device_init
  .create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Propagate errors as VkResults from ioctls through winsys
Matt Coster [Thu, 27 Apr 2023 14:25:26 +0000 (15:25 +0100)]
pvr: Propagate errors as VkResults from ioctls through winsys

Partially fixes: dEQP-VK.api.device_init
  .create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agopvr: Return VkResult from pvr_winsys_create()
Matt Coster [Wed, 26 Apr 2023 08:36:26 +0000 (09:36 +0100)]
pvr: Return VkResult from pvr_winsys_create()

Previously this function simply returned NULL on any error, which
caused OOM errors to be suppressed as initialization failures.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>

14 months agoradv: Use const keyword more.
Timur Kristóf [Tue, 16 May 2023 00:57:54 +0000 (02:57 +0200)]
radv: Use const keyword more.

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

14 months agoac: Use const keyword for some function arguments.
Timur Kristóf [Tue, 16 May 2023 00:54:32 +0000 (02:54 +0200)]
ac: Use const keyword for some function arguments.

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

14 months agointel: infer scalar'ness locally for brw_vectorize_lower_mem_access
Rohan Garg [Wed, 17 May 2023 15:26:35 +0000 (17:26 +0200)]
intel: infer scalar'ness locally for brw_vectorize_lower_mem_access

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

14 months agointel: update comments about non-existent function parameter
Rohan Garg [Wed, 17 May 2023 15:25:18 +0000 (17:25 +0200)]
intel: update comments about non-existent function parameter

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

14 months agointel: drop unused is_scalar function parameter in brw_nir_apply_key
Rohan Garg [Wed, 17 May 2023 15:09:06 +0000 (17:09 +0200)]
intel: drop unused is_scalar function parameter in brw_nir_apply_key

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

14 months agointel: infer scalar'ness locally for brw_postprocess_nir
Rohan Garg [Wed, 17 May 2023 14:44:17 +0000 (16:44 +0200)]
intel: infer scalar'ness locally for brw_postprocess_nir

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

14 months agopvr: Fix transfer image clearing PBE packmodes
Oskar Rundgren [Tue, 16 May 2023 17:24:30 +0000 (18:24 +0100)]
pvr: Fix transfer image clearing PBE packmodes

The PBE input format must match format in clear color registers.
Fixes image clearing for following formats:
  - B4G4R4A4_UNORM_PACK16
  - A8B8G8R8_UNORM_PACK32
  - R5G6B5_UNORM_PACK16
  - A1R5G5B5_UNORM_PACK16
  - R8G8B8A8_SNORM
  - R8G8_UNORM
  - R8G8_SNORM
  - R8_UNORM
  - R8_SNORM
  - A2B10G10R10_UINT_PACK32 - only packmode U32 supported

For some of the norm formats the clear color register format was
changed from integer (pvr_float_to_sfixed) to float (pvr_float_to_f16).
This change was done to match the default PBE emit Norm settings.
An alternative way to fix this would have been to change the PBE
Norm setting.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23082>

14 months agopvr: Use idalloc as the allocator for sync prims
Karmjit Mahil [Fri, 12 May 2023 14:49:35 +0000 (15:49 +0100)]
pvr: Use idalloc as the allocator for sync prims

Previously we allocated the sync prim at the end of the block and
also freed from the end. This is problematic if things are freed
out of order and some new ones allocated within the frees.

This commits uses the idalloc to keep track of the sync prim block
allocations.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23076>

14 months agopvr: Move pvrsrv sync prim code into new pvr_srv_sync_prim.{c,h}
Karmjit Mahil [Fri, 12 May 2023 12:43:51 +0000 (13:43 +0100)]
pvr: Move pvrsrv sync prim code into new pvr_srv_sync_prim.{c,h}

Some setup for later on when we'll start keeping track of sync
prim allocation with a proper allocator.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23076>

14 months agopvr: Add pvrsrvkm sync prim set bridge call
Karmjit Mahil [Fri, 12 May 2023 08:33:06 +0000 (09:33 +0100)]
pvr: Add pvrsrvkm sync prim set bridge call

To reuse a sync prim we'll need to set it to 0 so adding the
bridge call for that.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23076>

14 months agopvr: Simplify descriptor set layout dump separators
Matt Coster [Mon, 15 May 2023 08:25:27 +0000 (09:25 +0100)]
pvr: Simplify descriptor set layout dump separators

There's no need for macros here, and they make clang-format unhappy.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23028>

14 months agopvr: Add PVR_DEBUG=vk_desc option to dump descriptor set layouts
Matt Coster [Fri, 12 May 2023 14:18:10 +0000 (15:18 +0100)]
pvr: Add PVR_DEBUG=vk_desc option to dump descriptor set layouts

Prints on every call to vkCreate{DescriptorSet,Pipeline}Layout().

Previously, this could not be turned on or off at runtime, and was
dependent on DEBUG.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23028>

14 months agopvr: Remove bad assert in pvr_clear_attachments()
Matt Coster [Thu, 11 May 2023 13:59:45 +0000 (14:59 +0100)]
pvr: Remove bad assert in pvr_clear_attachments()

Fixes: dEQP-VK.renderpass.suballocation.formats.d16_unorm.input
  .dont_care.dont_care.clear
Fixes: dEQP-VK.renderpass.suballocation.formats.d32_sfloat.input
  .dont_care.dont_care.clear

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23024>

14 months agopvr: Return correct pbe_accum_format size for A2B10G10R10_UINT_PACK32
Matt Coster [Thu, 11 May 2023 13:29:28 +0000 (14:29 +0100)]
pvr: Return correct pbe_accum_format size for A2B10G10R10_UINT_PACK32

Fixes: dEQP-VK.renderpass.suballocation.formats.a2b10g10r10_uint_pack32
  .input.dont_care.dont_care.clear

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23024>