platform/upstream/mesa.git
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>

14 months agopvr: Set output_offset correctly in pvr_clear_color_attachment_static()
Matt Coster [Thu, 11 May 2023 13:29:53 +0000 (14:29 +0100)]
pvr: Set output_offset correctly in pvr_clear_color_attachment_static()

Fixes: dEQP-VK.renderpass.suballocation.formats.r16g16_sint.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 agointel/compiler: Postpone most int64 lowering to brw_postprocess_nir
Kenneth Graunke [Fri, 12 May 2023 09:21:03 +0000 (02:21 -0700)]
intel/compiler: Postpone most int64 lowering to brw_postprocess_nir

Float conversions continue to be lowered early at the same time as
nir_lower_doubles, which we run early so we don't have to run it for
every shader key variant.  However, all other int64 lowering is now
done late, after nir_opt_load_store_vectorize(), allowing it to
comprehend basic arithmetic on 64-bit addresses.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23064>

14 months agonir: Add a variant of nir_lower_int64 for float conversions only
Kenneth Graunke [Fri, 12 May 2023 09:20:39 +0000 (02:20 -0700)]
nir: Add a variant of nir_lower_int64 for float conversions only

We'd like to postpone most int64 lowering until pretty late in the
process, because e.g. turning iadd@64 into (unpack + add-low + add-high
+ compare + b2i32 + repack) sequences makes it difficult for many
optimization passes to detect basic arithmetic patterns.  In particular,
nir_opt_load_store_vectorizer becomes unable to handle basic offset math
on 64-bit addresses.

We'd like to do double precision lowering earlier in the process,
however.  One snag is that nir_lower_int64's lower_2f and lower_f2 can
produce operations that may need lowering by nir_lower_doubles(), so
it's crucial to run those sets of lowering together.

To handle this, we make a new entrypoint that does nir_lower_int64
but skips everything except float conversions.  Note that the newly
produced instructions will still be lowered according to the full set
of int64 lowering options; this shouldn't be a huge deal.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23064>

14 months agopvr: Use the suballocator for queries
Karmjit Mahil [Mon, 15 May 2023 16:26:55 +0000 (17:26 +0100)]
pvr: Use the suballocator for queries

Fixes:
  dEQP-VK.api.object_management.max_concurrent.query_pool

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23071>

14 months agopvr: Fix vk_free() in vkCreateRenderPass2() error path
Karmjit Mahil [Fri, 5 May 2023 12:45:07 +0000 (13:45 +0100)]
pvr: Fix vk_free() in vkCreateRenderPass2() error path

There was a missing vk_free() and one at the wrong place.

Fixes:
  dEQP-VK.api.object_management.alloc_callback_fail.render_pass

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

14 months agopvr: Fix possible allocation of 0 size
Karmjit Mahil [Fri, 5 May 2023 13:06:02 +0000 (14:06 +0100)]
pvr: Fix possible allocation of 0 size

Some tests had `input_count == 0` so the driver would attempt to
`vk_alloc()` a size of zero and error out. Add some checks to
prevent 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/23070>

14 months agopvr: Fix missing invalidation of the command buffer
Karmjit Mahil [Thu, 4 May 2023 13:26:35 +0000 (14:26 +0100)]
pvr: Fix missing invalidation of the command buffer

If the command buffer already had an error while recording, on
vkEndCommandBuffer() the command buffer wasn't being transitioned
to the invalid state.

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

14 months agopvr: Remove custom status in command buffer
Karmjit Mahil [Thu, 4 May 2023 13:17:28 +0000 (14:17 +0100)]
pvr: Remove custom status in command buffer

Some code still used our custom `status` field within the command
buffer. This could lead to unreliable error handling since we're
using the common vk_command_buffer handling.

This commit removes the field and changes the error paths to use
the common code instead.

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

14 months agoradv: fix a sync issue with primitives generated query and NGG/legacy
Samuel Pitoiset [Wed, 17 May 2023 13:55:12 +0000 (15:55 +0200)]
radv: fix a sync issue with primitives generated query and NGG/legacy

On RDNA1&2, the driver needs to support both NGG and legacy for
primitives generated query because we can't know that before starting
queries.

To get the query pool results, we check the availability bit wrote by
the SAMPLE_STREAMOUTSTATS packet but the GDS copy was emitted after,
which means the availability bit might be TRUE before the GDS copy is
actually done.

Fix this by emitting the GDS copy before to ensure the availability is
TRUE for both results.

This fixes recent updates in
dEQP-VK.transform_feedback.primitives_generated_query.* because the
tests no longer wait for the fence.

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

14 months agonir/lower_io: don't renumber VS inputs when not called from a linker
Marek Olšák [Thu, 4 May 2023 19:45:49 +0000 (15:45 -0400)]
nir/lower_io: don't renumber VS inputs when not called from a linker

This fixes a Nine regression. The comment explains it.

The new varying linking code will set true here.

Fixes: d29dd333 - nir: assign IO bases in nir_lower_io_passes
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8935

Reviewed-by: Timothy Arceri <tarceri@yahoo.com.au>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22859>

14 months agoloader/dri3: temporarily work around a crash when front is NULL
Konstantin Kharlamov [Thu, 18 May 2023 00:27:08 +0000 (03:27 +0300)]
loader/dri3: temporarily work around a crash when front is NULL

Commit c65bde7b1e introduced a regression where under certain
circumstances `front` may be NULL, thus leading to a crash. It's not
currently known what exactly causes `front` to become NULL, nor we can
revert the offending commit, because there had been too many unrelated
changes that now depend on this commit.

So until someone comes up with a proper fix, let's add a workaround so
instead of crashing we just return from the function early.

This commit was tested with the bug `8982` and helps with the crash
with no other noticeable problems.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8982
Fixes: c65bde7b1e ("frontend/dri: inline __DRIdrawable in dri_drawable, make __DRIdrawable opaque")
Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23093>

14 months agor600/sfn: use correct FS output location if not all outputs are used
Gert Wollny [Tue, 16 May 2023 16:41:09 +0000 (18:41 +0200)]
r600/sfn: use correct FS output location if not all outputs are used

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8973

Fixes 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
    r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>