platform/upstream/mesa.git
13 months agovenus: enable VK_EXT_border_color_swizzle
Juston Li [Wed, 7 Jun 2023 22:22:24 +0000 (15:22 -0700)]
venus: enable VK_EXT_border_color_swizzle

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

13 months agovenus: enable VK_KHR_shader_clock
Juston Li [Wed, 7 Jun 2023 21:49:39 +0000 (14:49 -0700)]
venus: enable VK_KHR_shader_clock

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

13 months agovenus: enable VK_EXT_dynamic_rendering_unused_attachments
Juston Li [Wed, 7 Jun 2023 21:32:12 +0000 (14:32 -0700)]
venus: enable VK_EXT_dynamic_rendering_unused_attachments

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

13 months agovenus: enable VK_EXT_non_seamless_cube_map
Juston Li [Wed, 7 Jun 2023 17:56:55 +0000 (10:56 -0700)]
venus: enable VK_EXT_non_seamless_cube_map

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

13 months agovenus: sync protocol for multiple extensions for zink
Juston Li [Wed, 7 Jun 2023 17:56:17 +0000 (10:56 -0700)]
venus: sync protocol for multiple extensions for zink

- VK_EXT_non_seamless_cube_map
- VK_EXT_dynamic_rendering_unused_attachments
- VK_KHR_shader_clock
- VK_EXT_border_color_swizzle
- VK_EXT_fragment_shader_interlock
- VK_EXT_shader_subgroup_ballot
- VK_EXT_color_write_enable

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

13 months agovenus: sync to latest protocol header from v1.3.252
Juston Li [Wed, 7 Jun 2023 20:54:25 +0000 (13:54 -0700)]
venus: sync to latest protocol header from v1.3.252

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

13 months agoutil/tests: add gc_alloc_size alignment tests
Rhys Perry [Wed, 7 Jun 2023 11:13:22 +0000 (12:13 +0100)]
util/tests: add gc_alloc_size alignment tests

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23501>

13 months agoutil: fix gc_alloc_size alignment
Rhys Perry [Wed, 7 Jun 2023 11:04:49 +0000 (12:04 +0100)]
util: fix gc_alloc_size alignment

This was only aligning the gc_block_header. The returned pointer could be
incorrectly aligned.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 69a9b343e8d ("util: add freelist allocator with mark/sweep")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9166
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23501>

13 months agoclc: relax spec constant validation
Karol Herbst [Wed, 7 Jun 2023 21:14:18 +0000 (23:14 +0200)]
clc: relax spec constant validation

Multiple values can have multiple spec constants assigned and vtn handles
this just fine. So just drop that assert as we need it to run SyCL
kernels.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9037
Fixes: a699844ffba ("microsoft/clc: Parse SPIR-V specialization consts into metadata")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23512>

13 months agorusticl: fix clippy errors on image_slice_pitch change to usize
Karol Herbst [Thu, 8 Jun 2023 12:42:00 +0000 (14:42 +0200)]
rusticl: fix clippy errors on image_slice_pitch change to usize

That field got changed from `unsigned` to `uintptr_t` on the C side, so
now we can drop a bit of code dealing with conversions to `usize`.

Fixes: 68735f4e860 ("treewide: use uint64_t / (u)intptr_t in image address calculations")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23522>

13 months agoci: add and use clippy for rusticl
Karol Herbst [Thu, 8 Jun 2023 11:40:03 +0000 (13:40 +0200)]
ci: add and use clippy for rusticl

Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23522>

13 months agodocs: update calendar for 23.1.2
Eric Engestrom [Thu, 8 Jun 2023 14:18:58 +0000 (16:18 +0200)]
docs: update calendar for 23.1.2

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

13 months agodocs/relnotes: add sha256sum for 23.1.2
Eric Engestrom [Thu, 8 Jun 2023 14:17:27 +0000 (16:17 +0200)]
docs/relnotes: add sha256sum for 23.1.2

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

13 months agodocs: add release notes for 23.1.2
Eric Engestrom [Thu, 8 Jun 2023 10:57:01 +0000 (12:57 +0200)]
docs: add release notes for 23.1.2

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

13 months agomesa: fix glBitmap in display lists when width <= 0 || height <= 0
Marek Olšák [Wed, 31 May 2023 15:09:03 +0000 (11:09 -0400)]
mesa: fix glBitmap in display lists when width <= 0 || height <= 0

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8904
Fixes: bb860f63 - mesa: create glBitmap textures while creating display lists

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

13 months agoradv: Clarify gang submit terminology.
Timur Kristóf [Mon, 17 Apr 2023 23:56:51 +0000 (01:56 +0200)]
radv: Clarify gang submit terminology.

This is done to better match the terminology used by the kernel
and also because the follower may not always be ACE in the future.

- Gang: a group of command streams that are submitted to
  more than one HW queue at the same time.
- Leader: the main command stream of a command buffer that works
  on the queue type of the command buffer.
- Follower: a command stream on a different HW queue that doesn't
  have a separate command buffer state and is submitted together
  with its leader.

During submission, a follower must always precede the leader in
the submitted command streams array.

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

13 months agozink: update some radv qbo fails
Mike Blumenkrantz [Thu, 8 Jun 2023 13:27:13 +0000 (09:27 -0400)]
zink: update some radv qbo fails

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

13 months agozink: stop swizzling conditional render during batch flush
Mike Blumenkrantz [Thu, 11 May 2023 14:29:00 +0000 (10:29 -0400)]
zink: stop swizzling conditional render during batch flush

conditional render is only supposed to be enabled during renderpasses,
and this ends up doing mismatched start/stop in and out of renderpasses

affects:
GTF-GL46.gtf30.GL3Tests.conditional_render*

cc: mesa-stable

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

13 months agozink: remove assert for dt in zink_kopper_update
Mike Blumenkrantz [Fri, 2 Jun 2023 12:44:23 +0000 (08:44 -0400)]
zink: remove assert for dt in zink_kopper_update

this is a valid (harmless) path that can be hit by in some cases

cc: mesa-stable

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

13 months agozink: check for cached mem correctly when mapping buffer
Mike Blumenkrantz [Wed, 7 Jun 2023 12:48:19 +0000 (08:48 -0400)]
zink: check for cached mem correctly when mapping buffer

bo placement is the mem index, not the mem flags

Fixes: 52f27cda05b ("zink: allow direct memory mapping for any COHERENT+CACHED buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23511>

13 months agozink: don't check prog->shaders when creating gfx pipeline
Mike Blumenkrantz [Wed, 31 May 2023 19:27:30 +0000 (15:27 -0400)]
zink: don't check prog->shaders when creating gfx pipeline

these objects don't technically belong to the pipeline, and checking
them may lead to inconsistent results in some corner cases

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

13 months agozink: combine some rast state draw conditionals
Mike Blumenkrantz [Thu, 25 May 2023 18:14:23 +0000 (14:14 -0400)]
zink: combine some rast state draw conditionals

no functional changes

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

13 months agodocs/features update opencl extensions add rusticl
norablackcat [Thu, 8 Jun 2023 10:17:02 +0000 (04:17 -0600)]
docs/features update opencl extensions add rusticl

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23055>

13 months agorusticl: add cl_khr_create_command_queue
norablackcat [Thu, 8 Jun 2023 10:16:50 +0000 (04:16 -0600)]
rusticl: add cl_khr_create_command_queue

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23055>

13 months agodocs/relnotes/23.1.1: clear "new features"
Eric Engestrom [Thu, 8 Jun 2023 11:09:00 +0000 (13:09 +0200)]
docs/relnotes/23.1.1: clear "new features"

I should've done this after 23.1.0/before 23.1.1, but I forgot :]

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23521>

13 months agoaco/tests: test that s_bfe bits is masked
Rhys Perry [Tue, 6 Jun 2023 11:02:02 +0000 (12:02 +0100)]
aco/tests: test that s_bfe bits is masked

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23464>

13 months agoaco: mask bits source of s_bfe
Rhys Perry [Tue, 6 Jun 2023 09:55:16 +0000 (10:55 +0100)]
aco: mask bits source of s_bfe

The s_bfe instructions use 7 bits, not 5 like the NIR opcode requires.

No fossil-db changes (navi21).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9162
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23464>

13 months agopvr: Add support for sampler border colors
Matt Coster [Fri, 24 Feb 2023 14:06:39 +0000 (14:06 +0000)]
pvr: Add support for sampler border colors

Currently only the six vulkan 1.0 pre-defined formats are supported,
but some basic infrastructure that will be useful for implementing
VK_EXT_custom_border_color (and vulkan 1.1) is included.

Only formats currently listed in the pvr_format_table in pvr_formats.c
are currently supported. Unlike most (all?) other drivers, the PowerVR
hardware requires each entry in the border color table to be encoded
for every hardware format (of which there are 128 available, plus 128
for compressed formats).

Also in this commit:
 - Two new constants in rogue_texstate.xml:
    - IMAGE_WORD0_TEXFORMAT_MAX_SIZE, and
    - SAMPLER_BORDERCOLOR_INDEX_MAX_SIZE; and
 - A new device feature (tpu_border_colour_enhanced)

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21555>

13 months agopvr: Declare dependency on idep_mesautil
Matt Coster [Thu, 8 Jun 2023 09:32:15 +0000 (10:32 +0100)]
pvr: Declare dependency on idep_mesautil

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21555>

13 months agoetnaviv: make wider use of DBG_ENABLED(..)
Christian Gmeiner [Wed, 7 Jun 2023 09:16:43 +0000 (11:16 +0200)]
etnaviv: make wider use of DBG_ENABLED(..)

Make the source code more consistent.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23495>

13 months ago.mailmap: add an alias for Christian Gmeiner
Andres Gomez [Wed, 7 Jun 2023 10:32:53 +0000 (12:32 +0200)]
.mailmap: add an alias for Christian Gmeiner

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23498>

13 months agopvr: HWRT creation simplifications.
Karmjit Mahil [Fri, 13 May 2022 10:53:53 +0000 (11:53 +0100)]
pvr: HWRT creation simplifications.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20092>

13 months agor600/sfn: Don't rewrite TESS_EVAL inner tess level outputs
Gert Wollny [Wed, 31 May 2023 15:45:03 +0000 (17:45 +0200)]
r600/sfn: Don't rewrite TESS_EVAL inner tess level outputs

Fixes: 5cd3e3950 (r600/sfn: Make sure all components are usable when lowering TF inputs)

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

13 months agor600/sfn: add read instruction for unused but required LDS op results
Gert Wollny [Wed, 31 May 2023 15:44:16 +0000 (17:44 +0200)]
r600/sfn: add read instruction for unused but required LDS op results

DS_XCHG_RET and LDS_CMP_XCHG_RET don't have a version that doesn't return
a value in the LDS red queue. so we have to read the value from the queue
and discard it.

Fixes: 79ca456b (r600/sfn: rewrite NIR backend)

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

13 months agopvr: fixup assert in pvr_cmd_buffer_alloc_mem
Luigi Santivetti [Tue, 16 May 2023 13:36:24 +0000 (14:36 +0100)]
pvr: fixup assert in pvr_cmd_buffer_alloc_mem

Stop explicitly passing PVR_BO_ALLOC_FLAG_CPU_MAPPED to
pvr_cmd_buffer_alloc_mem(). This is redundant for sub-allocations,
as they are always unconditionally mapped to the CPU.

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

13 months agopvr: fix infinite recursion in pvr_cmd_buffer_{start,end}_sub_cmd
SoroushIMG [Tue, 16 May 2023 13:22:15 +0000 (14:22 +0100)]
pvr: fix infinite recursion in pvr_cmd_buffer_{start,end}_sub_cmd

Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23463>

13 months agoutil/driconf: pin minImageCount to three for "Path of Exile"
Gert Wollny [Mon, 27 Feb 2023 08:56:41 +0000 (09:56 +0100)]
util/driconf: pin minImageCount to three for "Path of Exile"

"Path of Exile" will fail with an error "unsupported backbuffer image count"
when vkGetPhysicalDeviceSurfaceCapabilitiesKHR reports more than 3 as
minImageCount.

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

13 months agor600/sfn: Fix warning about overloads hiding virtual functions
Caio Oliveira [Wed, 7 Jun 2023 20:13:53 +0000 (13:13 -0700)]
r600/sfn: Fix warning about overloads hiding virtual functions

Fixes multiple warnings when building with g++ 13.1.1 that look like

```
./src/gallium/drivers/r600/sfn/sfn_scheduler.cpp:1111:9: warning: ‘virtual void r600::CheckArrayAccessVisitor::visit(const r600::InlineConstant&)’ was hidden [-Woverloaded-virtual=]
 1111 |    void visit(const InlineConstant& value) override {(void)value;}
      |         ^~~~~
../src/gallium/drivers/r600/sfn/sfn_scheduler.cpp:1125:9: note:   by ‘virtual void r600::UpdateArrayWrite::visit(const r600::LocalArrayValue&)’
 1125 |    void visit(const LocalArrayValue& value) override {
      |         ^~~~~
(...)
```

What's going on here is when mixing overloading and virtual functions,
compiler will warn when one of the variants is not overriden.  So tell
it to also use the base class definitions.

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

13 months agocompiler: use align instead glsl_align and remove glsl_align
Yonggang Luo [Sun, 4 Jun 2023 06:59:45 +0000 (14:59 +0800)]
compiler: use align instead glsl_align and remove glsl_align

#include "util/u_math.h" when necessary to call align function

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>

13 months agoutil: Do not use align as variable name
Yonggang Luo [Sun, 4 Jun 2023 06:59:01 +0000 (14:59 +0800)]
util: Do not use align as variable name

Because align is also a function in u_math.h

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>

13 months agoutil: use uint32_t as the parameter of align function
Yonggang Luo [Sun, 4 Jun 2023 06:42:51 +0000 (14:42 +0800)]
util: use uint32_t as the parameter of align function

align on negative value doesn't make sense

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>

13 months agoutil: Remove redundant type cast in function align64
Yonggang Luo [Mon, 5 Jun 2023 17:00:03 +0000 (01:00 +0800)]
util: Remove redundant type cast in function align64

Fixes: 0a06cf75231 ("util: migrate alignment functions and macros to use ALIGN_POT")

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>

13 months agogallivm: Zero initialize param structs
Konstantin Seurer [Fri, 5 May 2023 19:34:16 +0000 (21:34 +0200)]
gallivm: Zero initialize param structs

Zero all param structs using {0} because it's shorter than a memset and
there were some instances where the structs weren't zero initialized.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agogallivm: Handle invalid image format/op combinations
Konstantin Seurer [Sun, 28 May 2023 09:36:13 +0000 (11:36 +0200)]
gallivm: Handle invalid image format/op combinations

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agogallivm: Add lp_img_op_from_intrinsic
Konstantin Seurer [Fri, 28 Apr 2023 09:27:52 +0000 (11:27 +0200)]
gallivm: Add lp_img_op_from_intrinsic

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agogallivm: Add lp_build_nir_sample_key
Konstantin Seurer [Tue, 25 Apr 2023 15:32:51 +0000 (17:32 +0200)]
gallivm: Add lp_build_nir_sample_key

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agollvmpipe: Add lp_storage_render_image_format_supported
Konstantin Seurer [Fri, 21 Apr 2023 09:43:53 +0000 (11:43 +0200)]
llvmpipe: Add lp_storage_render_image_format_supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agollvmpipe: Add lp_storage_image_format_supported
Konstantin Seurer [Wed, 19 Apr 2023 21:00:40 +0000 (23:00 +0200)]
llvmpipe: Add lp_storage_image_format_supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agollvmpipe: refactor out the pipe->lp_jit structure fillers.
Konstantin Seurer [Thu, 8 Jun 2023 03:16:49 +0000 (13:16 +1000)]
llvmpipe: refactor out the pipe->lp_jit structure fillers.

These are useful later for descriptor indexing, but refactor them
out now.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agogallivm: Cast read_first_invocation source to an int
Konstantin Seurer [Wed, 7 Jun 2023 20:23:52 +0000 (22:23 +0200)]
gallivm: Cast read_first_invocation source to an int

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agogallivm: Fix anisotropic sampling with num_mips=1
Konstantin Seurer [Mon, 1 May 2023 17:35:55 +0000 (19:35 +0200)]
gallivm: Fix anisotropic sampling with num_mips=1

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>

13 months agolavapipe: ignore another yuv format.
Dave Airlie [Wed, 7 Jun 2023 02:05:44 +0000 (12:05 +1000)]
lavapipe: ignore another yuv format.

Since these were added to generic translation, lavapipe has
been annoyed.

Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23486>

13 months agoradv/video: fix hevc scaling lists.
Dave Airlie [Tue, 6 Jun 2023 07:30:02 +0000 (17:30 +1000)]
radv/video: fix hevc scaling lists.

These need some zscan conversion, that I've taken from vaapi.

v2: move to common code for it_ptr updates, add defines

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>

13 months agoradv/video: fix hevc st rps programming
Dave Airlie [Wed, 31 May 2023 02:54:53 +0000 (12:54 +1000)]
radv/video: fix hevc st rps programming

These needs to be programmed to fix some video glitches.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>

13 months agoradv/video: rework h265 reference frame bindings.
Dave Airlie [Wed, 31 May 2023 01:47:27 +0000 (11:47 +1000)]
radv/video: rework h265 reference frame bindings.

This reworks the ref frame bindings and allows dropping the tier_2 workaround.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>

13 months agoradv/video: don't supply an 8-bit format for a 10-bit dpb.
Dave Airlie [Tue, 30 May 2023 05:06:11 +0000 (15:06 +1000)]
radv/video: don't supply an 8-bit format for a 10-bit dpb.

The firmware can write an 8-bit output buffer, but still needs
a 10-bit dpb allocation.

This also puts the 8-bit format after the 10-bit format though
apps should be smart enough to pick the correct one.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>

13 months agoradv/video: convert session memory requirements to outarray.
Dave Airlie [Tue, 30 May 2023 04:45:48 +0000 (14:45 +1000)]
radv/video: convert session memory requirements to outarray.

These are just standard outarray so use the common code.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>

13 months agoradv/video: convert video format properties to an outarray
Dave Airlie [Tue, 30 May 2023 04:43:23 +0000 (14:43 +1000)]
radv/video: convert video format properties to an outarray

These are just standard outarray so use the common code.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>

13 months agoradv: fix non-square compressed image copy on gfx9
Chia-I Wu [Wed, 7 Jun 2023 01:14:54 +0000 (18:14 -0700)]
radv: fix non-square compressed image copy on gfx9

There is a typo in fixup_gfx9_cs_copy.

Fixed dEQP-VK.api.copy_and_blit.*.image_to_buffer.2d_images.mip_copies_bc*_64x192_* in deqp 1.3.6.0.

Fixes: 35f053ba8cd ("radv: Fix corrupted mipmap copies on GFX9+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23483>

13 months agorusticl/event: flush queues from dependencies
Karol Herbst [Sat, 20 May 2023 20:29:10 +0000 (22:29 +0200)]
rusticl/event: flush queues from dependencies

We have to flush all event dependencies inside clWaitForEvents and
clFinish implicitly otherwise applications might wait forever.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9052
Fixes: ebfffa1daec ("rusticl/event: wrong but non crashing impl of clWaitForEvents")
Cc: mesa-stable
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23110>

13 months agorusticl: bump rust req to 1.60
Karol Herbst [Wed, 24 May 2023 15:31:12 +0000 (17:31 +0200)]
rusticl: bump rust req to 1.60

We need this rustc bugfix:
https://github.com/rust-lang/rust/commit/6466f89fc5df36b4c841fca9d10e27c50dd744b5

Cc: mesa-stable
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23110>

13 months agodoc/rusticl: add Rust Update Policy
Karol Herbst [Wed, 24 May 2023 15:02:48 +0000 (17:02 +0200)]
doc/rusticl: add Rust Update Policy

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23110>

13 months agou_format: Use memcpy to avoid unaligned accesses
Matt Turner [Wed, 7 Jun 2023 00:53:41 +0000 (20:53 -0400)]
u_format: Use memcpy to avoid unaligned accesses

These functions are used by gl[Get]TexImage, which imposes no
alignment restructions on the void *pixels parameter.

This fixes an unaligned access in GTK's "gtk:gdk / memorytexture" unit
test on SPARC, which causes the test to fail.

Fixes: 45ae4434b5b ("util: Use bitshift arithmetic to unpack pixels.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23482>

13 months agoRevert "gallium/u_threaded: buffer sharedness tracking"
Pierre-Eric Pelloux-Prayer [Wed, 7 Jun 2023 08:28:23 +0000 (10:28 +0200)]
Revert "gallium/u_threaded: buffer sharedness tracking"

This reverts commit 8f159a8576efbb7bb3755d215a54b87c4c99a0d2.

This commit is correct but it exposes an existing bug: DISCARD_RANGE doesn't
work well with shared buffers.
So for now revert this commit as it's causing hangs on some APUs (see
https://gitlab.freedesktop.org/drm/amd/-/issues/2447) and flickering in
Metro Last Light Redux.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9108
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23492>

13 months agoanv: allow binding tables allocations on compute only queues
Lionel Landwerlin [Fri, 2 Jun 2023 07:02:29 +0000 (10:02 +0300)]
anv: allow binding tables allocations on compute only queues

COMPUTE_WALKER is using binding tables.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: eb2b309328 ("anv: defer binding table block allocation to when necessary")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23506>

13 months agodraw: repack some members of context.
Dave Airlie [Wed, 7 Jun 2023 05:39:11 +0000 (15:39 +1000)]
draw: repack some members of context.

this just fills a hole in

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

13 months agodraw: add a max stage define and use it in a few places
Dave Airlie [Wed, 7 Jun 2023 05:33:34 +0000 (15:33 +1000)]
draw: add a max stage define and use it in a few places

This should decrease the size of some memory allocations.

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

13 months agodraw: refactor resources to use arrays instead of explicit structs.
Dave Airlie [Wed, 7 Jun 2023 05:16:47 +0000 (15:16 +1000)]
draw: refactor resources to use arrays instead of explicit structs.

This should simplify the code and make it easier to refactor later.

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

13 months agogallium/tgsi/draw/softpipe: remodel shader const/buffer bindings.
Dave Airlie [Wed, 7 Jun 2023 05:00:56 +0000 (15:00 +1000)]
gallium/tgsi/draw/softpipe: remodel shader const/buffer bindings.

This remodels things around a buffer object.

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

13 months agodraw/tess: drop unused tgsi bits.
Dave Airlie [Wed, 7 Jun 2023 05:00:25 +0000 (15:00 +1000)]
draw/tess: drop unused tgsi bits.

tess isn't supported by tgsi

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

13 months agodraw: rename jit to vs_jit in lots of places.
Dave Airlie [Wed, 7 Jun 2023 04:33:34 +0000 (14:33 +1000)]
draw: rename jit to vs_jit in lots of places.

we should have done this when geom shaders got added,
do it now, will make it easier to consolidate some code in macros

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

13 months agogallivm/nir: fix shuffleup tests.
Dave Airlie [Wed, 7 Jun 2023 01:25:49 +0000 (11:25 +1000)]
gallivm/nir: fix shuffleup tests.

So the shuffleup tests did a shuffle up with const 5,
we'd use invocation id (0..8) shuffle it down by 5,
get (-5..3), then call llvmshufflevector with that
which is totally illegal.

There might be a nicer way to fix this, but I can't see
it straight away, just bail on the fast path.

Fixes:
dEQP-VK.subgroups.shuffle.compute.subgroupshuffleup*

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23484>

13 months agolavapipe: NV_device_generated_commands
Mike Blumenkrantz [Fri, 2 Jun 2023 14:22:11 +0000 (10:22 -0400)]
lavapipe: NV_device_generated_commands

this adds sufficient handling to pass the vkd3d-proton tests as well
as running cts on zink, which is gonna have to be enough since there's
no vkcts

it works by dynamically generating a vk_cmd_queue list of commands just
like the regular cmd queue would generate, with the minor change that
the final link has a nulled next pointer to correctly handle buffer copies,
where the last link would otherwise have a next pointer pointing to the
original cmd list

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>

13 months agolavapipe: handle index buffers with offsets for indirect draws
Mike Blumenkrantz [Fri, 2 Jun 2023 14:19:36 +0000 (10:19 -0400)]
lavapipe: handle index buffers with offsets for indirect draws

gallium has no mechanism for setting an offset to the index buffer,
so this requires a new buffer to be created+bound dynamically at
the specified offset in order to read the correct data

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>

13 months agolavapipe: add a zeroed buffer that can be bound in place of an index buffer
Mike Blumenkrantz [Wed, 31 May 2023 16:01:24 +0000 (12:01 -0400)]
lavapipe: add a zeroed buffer that can be bound in place of an index buffer

technically this is illegal in vulkan semantics, but some extensions have
their own definition of "illegal" when it comes to binding index buffers

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>

13 months agolavapipe: add a mapping for BDA
Mike Blumenkrantz [Wed, 31 May 2023 15:59:25 +0000 (11:59 -0400)]
lavapipe: add a mapping for BDA

when passing around BDA, it's important to be able to link the pointer
back to the pipe_resource since BDA doesn't have an explicit lifetime

this mapping enables cmds to receive a BDA pointer and then map it back
to a pipe_resource in order to avoid gymnastics with dynamically creating
pipe_resource objects which may or may not be able to be freed

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>

13 months agolavapipe: pass list to cmdbuf exec, not cmdbuf
Mike Blumenkrantz [Thu, 25 May 2023 14:11:33 +0000 (10:11 -0400)]
lavapipe: pass list to cmdbuf exec, not cmdbuf

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>

13 months agoradv/rt: remove now dead code
Daniel Schürmann [Wed, 10 May 2023 07:48:46 +0000 (09:48 +0200)]
radv/rt: remove now dead code

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

13 months agoradv/rt: use priorities to select the next shader
Daniel Schürmann [Wed, 22 Mar 2023 01:12:35 +0000 (02:12 +0100)]
radv/rt: use priorities to select the next shader

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

13 months agoradv/debug: dump ray tracing shaders in case of a hang
Daniel Schürmann [Wed, 22 Mar 2023 20:21:31 +0000 (21:21 +0100)]
radv/debug: dump ray tracing shaders in case of a hang

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

13 months agoradv/rt: separate shader compilation
Daniel Schürmann [Fri, 10 Mar 2023 17:40:58 +0000 (18:40 +0100)]
radv/rt: separate shader compilation

With this patch, we compile separately
 - general shaders (raygen, miss, callable)
 - closest-hit shaders
 - traversal shader (incl. all intersection / any-hit shaders)

Each shader uses the following scheme:

  if (shader_pc == shader_va) {
     <shader code>
  }
  next = select_next_shader(shader_va)
  jump next

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

13 months agoaco: adjust RT prolog for shader functions [disables RT]
Daniel Schürmann [Thu, 9 Mar 2023 16:44:46 +0000 (17:44 +0100)]
aco: adjust RT prolog for shader functions [disables RT]

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

13 months agoradv/rt: adjust lower_rt_instructions() for shader functions [disables RT]
Daniel Schürmann [Thu, 9 Mar 2023 15:13:41 +0000 (16:13 +0100)]
radv/rt: adjust lower_rt_instructions() for shader functions [disables RT]

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

13 months agoradv/rt: set up RT shader args for separate compilation
Daniel Schürmann [Wed, 8 Mar 2023 11:27:27 +0000 (12:27 +0100)]
radv/rt: set up RT shader args for separate compilation

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

13 months agoradv: Disable capture/replay handles
Friedrich Vock [Sun, 30 Apr 2023 18:01:35 +0000 (20:01 +0200)]
radv: Disable capture/replay handles

They don't work with separate compilation. Fixing this involves some
refactoring work, which will come in future MRs.

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

13 months agoradv/rt: create compile_rt_prolog() function
Daniel Schürmann [Tue, 9 May 2023 09:15:19 +0000 (11:15 +0200)]
radv/rt: create compile_rt_prolog() function

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

13 months agoradv/rt: don't write cache hit feedback per stage.
Daniel Schürmann [Tue, 9 May 2023 00:13:30 +0000 (02:13 +0200)]
radv/rt: don't write cache hit feedback per stage.

Too much boilerplate for no benefit.

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

13 months agoradv/rt: reference library shaders during radv_rt_fill_stage_info()
Daniel Schürmann [Mon, 8 May 2023 17:41:12 +0000 (19:41 +0200)]
radv/rt: reference library shaders during radv_rt_fill_stage_info()

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

13 months agoradv/rt: add and use specialized cache search/insert functions
Daniel Schürmann [Mon, 20 Mar 2023 23:42:11 +0000 (00:42 +0100)]
radv/rt: add and use specialized cache search/insert functions

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

13 months agoradv/rt: pass radv_ray_tracing_pipeline to RT shader creation
Daniel Schürmann [Thu, 1 Jun 2023 10:20:31 +0000 (12:20 +0200)]
radv/rt: pass radv_ray_tracing_pipeline to RT shader creation

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

13 months agoradv/rt: replace pCreateInfo with VkPipelineCreateFlags in rt_variables
Daniel Schürmann [Thu, 1 Jun 2023 09:59:29 +0000 (11:59 +0200)]
radv/rt: replace pCreateInfo with VkPipelineCreateFlags in rt_variables

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

13 months agoradv/rt: change RT main shader to MESA_SHADER_INTERSECTION
Daniel Schürmann [Tue, 9 May 2023 10:06:46 +0000 (12:06 +0200)]
radv/rt: change RT main shader to MESA_SHADER_INTERSECTION

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

13 months agoradv/rt: implement radv_rt_nir_to_asm()
Daniel Schürmann [Wed, 8 Mar 2023 03:27:30 +0000 (04:27 +0100)]
radv/rt: implement radv_rt_nir_to_asm()

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

13 months agoradv/rt: implement radv_nir_lower_rt_abi to lower RT shaders for separate compilation
Daniel Schürmann [Mon, 6 Mar 2023 19:03:49 +0000 (20:03 +0100)]
radv/rt: implement radv_nir_lower_rt_abi to lower RT shaders for separate compilation

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

13 months agoradv/shader_info: add RT stages to radv_get_user_data_0()
Daniel Schürmann [Tue, 11 Apr 2023 19:58:15 +0000 (21:58 +0200)]
radv/shader_info: add RT stages to radv_get_user_data_0()

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

13 months agoradv/rt: extend radv_pipeline_group_handle with shader VAs
Daniel Schürmann [Tue, 7 Mar 2023 23:36:45 +0000 (00:36 +0100)]
radv/rt: extend radv_pipeline_group_handle with shader VAs

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

13 months agoradv/rt: adjust shared_size when lowering hit_attribs
Daniel Schürmann [Fri, 10 Mar 2023 19:10:25 +0000 (20:10 +0100)]
radv/rt: adjust shared_size when lowering hit_attribs

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

13 months agoaco: implement select_program_rt()
Daniel Schürmann [Fri, 10 Mar 2023 18:56:43 +0000 (19:56 +0100)]
aco: implement select_program_rt()

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

13 months agoaco: implement nir_intrinsic_load_resume_shader_address_amd
Daniel Schürmann [Thu, 12 May 2022 21:29:37 +0000 (23:29 +0200)]
aco: implement nir_intrinsic_load_resume_shader_address_amd

Similar to p_constaddr but targeting BBs.

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

13 months agonir: add nir_intrinsic_resume_shader_address_amd
Daniel Schürmann [Thu, 12 May 2022 21:21:57 +0000 (23:21 +0200)]
nir: add nir_intrinsic_resume_shader_address_amd

This intrinsic returns a pointer to the end of the shader
and is intended for stitched binaries.

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