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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Gert Wollny [Sun, 14 May 2023 12:48:51 +0000 (14:48 +0200)]
r600/sfn: move kill handling fully to scheduling
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>
Gert Wollny [Wed, 17 May 2023 06:07:51 +0000 (08:07 +0200)]
r600/sfn: add dependencies for kill instructions
GDS and image instructions have side effects, so they can't be
reordered with kill instructions.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>
Gert Wollny [Wed, 17 May 2023 06:08:22 +0000 (08:08 +0200)]
r600/sfn: move kill instruction test to alu instruction
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>
Jesse Natalie [Mon, 15 May 2023 22:53:46 +0000 (15:53 -0700)]
glsl: Delete dead intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23041>
Jordan Justen [Wed, 17 May 2023 01:46:50 +0000 (18:46 -0700)]
mesa/main: Exit early when trying to create an unsupported context API
Fixes:
adbe8b6c17a ("mesa: optimize out _mesa_is_desktop_gl*() and _mesa_is_gles*() calls when not built")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9038
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23068>
Mike Blumenkrantz [Thu, 11 May 2023 14:21:18 +0000 (10:21 -0400)]
vtn: add more info to bitcast bit size error message
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>
Mike Blumenkrantz [Tue, 9 May 2023 20:50:06 +0000 (16:50 -0400)]
vtn: print spirv ids for type mismatch in bcsel
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>
Mike Blumenkrantz [Tue, 9 May 2023 20:19:41 +0000 (16:19 -0400)]
vtn: print spirv id for type mismatch error
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>
Mike Blumenkrantz [Tue, 9 May 2023 15:51:55 +0000 (11:51 -0400)]
vtn: add spirv index to type mismatch error for debugging
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>
Alyssa Rosenzweig [Wed, 17 May 2023 13:26:20 +0000 (09:26 -0400)]
nir: Drop unused argument from nir_ssa_dest_init_for_type
Similar to nir_ssa_dest_init, but with fewer call sites to churn through.
This was done with the help of Coccinelle:
@@
expression A, B, C, D;
@@
-nir_ssa_dest_init_for_type(A, B, C, D);
+nir_ssa_dest_init_for_type(A, B, C);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078>
Alyssa Rosenzweig [Wed, 17 May 2023 13:08:22 +0000 (09:08 -0400)]
nir: Drop unused name from nir_ssa_dest_init
Since
624e799cc34 ("nir: Drop nir_ssa_def::name and nir_register::name"), SSA
defs don't have names, making the name argument unused. Drop it from the
signature and fix the call sites. This was done with the help of the following
Coccinelle semantic patch:
@@
expression A, B, C, D, E;
@@
-nir_ssa_dest_init(A, B, C, D, E);
+nir_ssa_dest_init(A, B, C, D);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078>
Caio Oliveira [Fri, 12 May 2023 00:05:26 +0000 (17:05 -0700)]
spirv: Improve the 'ID is the wrong kind of value' error messages
Include the expected and actual values in the errors -- since
very frequently we care about them to diagnose issues.
Since these helpers are meant to be inlined, also pull the
failure code out of the way into a separate function (not meant to
be inlined). This way, extra calls to to_string will not harm
the existing client code size. Verified this with GCC release build.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22977>
Lionel Landwerlin [Fri, 12 May 2023 13:20:57 +0000 (16:20 +0300)]
anv: mark images compressed for untracked layout/access
Most of the compressed writes are tracked by the driver, for
instances :
- blorp writes
- render target writes
But we don't have any tracking for storage images (which have gained
compression support on DG2+). So inspect the layout transition and
when we see a layout/access that can do writes outside of our driver
tracking, update the image state tracking.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8946
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22988>
David Heidelberg [Wed, 17 May 2023 20:34:08 +0000 (22:34 +0200)]
ci/v3d: add flaking opengl 1.1@depthstencil-default_fb-drawpixels-float-and-ushort
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23086>