platform/upstream/mesa.git
22 months agozink/ci: skip GLX tests with RADV
Samuel Pitoiset [Fri, 23 Sep 2022 06:37:46 +0000 (08:37 +0200)]
zink/ci: skip GLX tests with RADV

Can't work with GBM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>

22 months agozink/ci: skip arb_shader_clock with RADV
Samuel Pitoiset [Thu, 22 Sep 2022 16:57:48 +0000 (18:57 +0200)]
zink/ci: skip arb_shader_clock with RADV

They are too random.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>

22 months agozink/ci: skip ext_external_objects from Piglit with RADV
Samuel Pitoiset [Mon, 22 Aug 2022 20:31:41 +0000 (22:31 +0200)]
zink/ci: skip ext_external_objects from Piglit with RADV

This subset randomly hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>

22 months agointel/nir/rt: fixup alignment of memcpy iterations
Lionel Landwerlin [Wed, 20 Jul 2022 14:01:21 +0000 (17:01 +0300)]
intel/nir/rt: fixup alignment of memcpy iterations

Not sure if fixes anything because it's always 16 at least, but this
is more correct.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/fs: fixup a64 messages
Lionel Landwerlin [Wed, 20 Jul 2022 13:53:14 +0000 (16:53 +0300)]
intel/fs: fixup a64 messages

And run algebraic when either int64 for float64 are not supported so
those don't end up in the generated code.

Cc: mesa-stable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/nir/rt: store ray query state in scratch
Lionel Landwerlin [Tue, 19 Jul 2022 19:09:17 +0000 (22:09 +0300)]
intel/nir/rt: store ray query state in scratch

Initially I tried to store ray query state in the RT scratch space but
got the offset wrong. In the end putting this in the scratch surface
makes more sense, especially for non RT stages.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/nir/rt: change scratch check validation
Lionel Landwerlin [Tue, 19 Jul 2022 19:04:35 +0000 (22:04 +0300)]
intel/nir/rt: change scratch check validation

It's very unfortunate that we have the RT scratch being conflated with
the usual scratch. In our implementation those are 2 different buffers.

The usual scratch access are done through the scratch surface state
(delivered through thread payload), while RT scratch (which outlives
thread dispatch with shader calls) is its own buffer.

So checking the NIR scratch size makes no sense as we can have normal
scratch accesses completely unrelated to RT scratch accesses.

This change switches the validation by looking at whether the scratch
base pointer intrinsic is being used (which is what we use/abuse to
implement RT scratch).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/nir/rt: fix ray query proceed level
Lionel Landwerlin [Tue, 19 Jul 2022 18:50:44 +0000 (21:50 +0300)]
intel/nir/rt: fix ray query proceed level

Initially the level is world (top level), then it's whatever level the
potential hit is.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/nir/rt: remove ray query mem hit writes at initialization
Lionel Landwerlin [Wed, 20 Jul 2022 14:03:22 +0000 (17:03 +0300)]
intel/nir/rt: remove ray query mem hit writes at initialization

This will not even be read by HW.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/nir/rt: spill/fill the entire ray query data
Lionel Landwerlin [Tue, 19 Jul 2022 18:47:45 +0000 (21:47 +0300)]
intel/nir/rt: spill/fill the entire ray query data

We need the traversal stack to saved/restored along with mem hits.
Total spill/fill is 256bytes.

We can potentially optimize this but we have to be very careful about
what state the query is in.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agointel/nir/rt: fixup generate hit
Lionel Landwerlin [Thu, 7 Jul 2022 10:31:46 +0000 (13:31 +0300)]
intel/nir/rt: fixup generate hit

This function copies the potential hit from its memory location to the
committed hit location. A couple of fields got their bit offset wrong.

Fixes some CTS tests in dEQP-VK.ray_query.*

v2: Copy primitive/instance leaf pointers

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 046571479028 ("intel/nir/rt: add more helpers for ray queries")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>

22 months agomeson: Improve detection of qsort_r().
Xin LI [Fri, 23 Sep 2022 06:05:53 +0000 (23:05 -0700)]
meson: Improve detection of qsort_r().

Instead of trying to guess the interface style by solely checking
the OS name, check if a fake test program can be built and linked.
This will give more accurate result when FreeBSD and other systems
moved to the interface based on GNU qsort_r().

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18527>

22 months agor600: Make NIR the default shader IR
Gert Wollny [Fri, 16 Sep 2022 14:32:33 +0000 (16:32 +0200)]
r600: Make NIR the default shader IR

By default sb is disabled, to enable it one can
set
  R600_DEBUG=nirsb

TGSI can be enabled by using
  R600_DEBUG=use_tgsi

In this case "sb" will be enabled, but one can use
the TGSI backend without sb by setting

  R600_DEBUG=use_tgsi,sb

Closes: #6858

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

22 months agor600: Add slot to ALU disassambly
Gert Wollny [Fri, 16 Sep 2022 14:43:12 +0000 (16:43 +0200)]
r600: Add slot to ALU disassambly

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

22 months agolavapipe: use slow clear path if conditional rendering.
Dave Airlie [Mon, 19 Sep 2022 20:40:21 +0000 (06:40 +1000)]
lavapipe: use slow clear path if conditional rendering.

the ->clear path checks render condition which isn't necessary.

Fixes dEQP-VK.conditional_rendering.draw.condition_host_memory_expect_noop_rp_clear.draw*

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18686>

22 months agoradv: rework and rename radv_make_buffer_descriptor()
Samuel Pitoiset [Wed, 21 Sep 2022 11:35:42 +0000 (13:35 +0200)]
radv: rework and rename radv_make_buffer_descriptor()

Pass the VA directly and rename to radv_make_texel_buffer_descriptor().
This helper will be re-used for future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750>

22 months agoradv: remove unnecessary radv_buffer_view::vk_format
Samuel Pitoiset [Wed, 21 Sep 2022 11:32:27 +0000 (13:32 +0200)]
radv: remove unnecessary radv_buffer_view::vk_format

It's not really useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750>

22 months agoradv: pass a VkSampler to write_sampler_descriptor()
Samuel Pitoiset [Tue, 20 Sep 2022 14:03:53 +0000 (16:03 +0200)]
radv: pass a VkSampler to write_sampler_descriptor()

For future work, and remove useless radv_device parameter.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750>

22 months agobroadcom/compiler: don't apply robust buffer access to shared variables
Iago Toral Quiroga [Thu, 22 Sep 2022 06:41:50 +0000 (08:41 +0200)]
broadcom/compiler: don't apply robust buffer access to shared variables

This feature is only concerned with buffers bound through a descriptor
set. We are still keeping the code for this (disabled by default) since
it may be useful for debugging some scenarios.

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

22 months agobroadcom/compiler: handle shared stores with robust buffer access
Iago Toral Quiroga [Thu, 22 Sep 2022 07:20:46 +0000 (09:20 +0200)]
broadcom/compiler: handle shared stores with robust buffer access

For some reason we supported all shared intrinsics but this one.

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

22 months agobroadcom/compiler: fix robust buffer access
Iago Toral Quiroga [Thu, 22 Sep 2022 07:18:18 +0000 (09:18 +0200)]
broadcom/compiler: fix robust buffer access

Our implemention was bogus, it was only putting a cap on the offset
based on the aligned buffer size and this doesn't ensure the access
to the buffer happens within its valid range.

I think the only reason we have been passing the tests is that we
align all buffers sizes to 256B and the tests create buffers with a
size that is smaller than that (like 64B). When get the size of the
buffer from the shader, we get the actual bound range (so 64B in this
case) and by capping to that we don't ensure the access will stay
within that range, but we ensure it will stay within the underlying
memory bound to the buffer (256B), and this is fine by the spec,
however, I think if the actual buffer range was the same as the
underlying allocation we would fail the tests.

A valid behavior for robust buffer access on an out-of-bounds access
is to return any valid bytes within the buffer, so we can just
make that offset 0.

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

22 months agovbo/dlist: keep buffers used in loopback_vertex_list() mapped.
Paul Gofman [Tue, 28 Jun 2022 01:39:04 +0000 (20:39 -0500)]
vbo/dlist: keep buffers used in loopback_vertex_list() mapped.

When display list loopback path is hit the major performance
drop during glCallList() happens due to constantly mapping and
unmapping the buffer.

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

22 months agogallium/u_threaded: add an option for unsychronized create_fence_fd
Marek Olšák [Wed, 21 Sep 2022 20:12:25 +0000 (16:12 -0400)]
gallium/u_threaded: add an option for unsychronized create_fence_fd

And enable it for radeonsi. This may be needed by Android.

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

22 months agozink: handle culldistance xfb outputs like clipdistance
Mike Blumenkrantz [Thu, 22 Sep 2022 19:33:48 +0000 (15:33 -0400)]
zink: handle culldistance xfb outputs like clipdistance

fixes:
spec@ext_transform_feedback@builtin-varyings gl_culldistance

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724>

22 months agoglsl: fix gl_CullDistance xfb linking
Mike Blumenkrantz [Wed, 21 Sep 2022 14:49:33 +0000 (10:49 -0400)]
glsl: fix gl_CullDistance xfb linking

this matches the behavior for gl_ClipDistance

ref #7152

Fixes: 0c8492cd3b2 ("glsl: fix location for array subscript")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724>

22 months agospirv: Make a helper function to check glslang/shaderc
Caio Oliveira [Wed, 21 Sep 2022 20:43:56 +0000 (13:43 -0700)]
spirv: Make a helper function to check glslang/shaderc

When deciding on workarounds that apply to GLSLang we should also check
for ShaderC (when using glslang).  Add a helper to do that and reuse in
the three places we check for it.

This patch will now consider shaderc for wa_glslang_cs_barrier workaround.

Suggested by Timur Kristóf.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>

22 months agospirv: Call vtn_emit_ret_store() only when handling return branch
Caio Oliveira [Mon, 19 Sep 2022 22:19:36 +0000 (15:19 -0700)]
spirv: Call vtn_emit_ret_store() only when handling return branch

No need to call it at the end of every block, since we already
know and identified the blocks terminating with returns.

Suggested by Jason Ekstrand.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>

22 months agospirv: Add workaround to ignore OpReturn after OpEmitMeshTasksEXT
Caio Oliveira [Mon, 19 Sep 2022 20:50:55 +0000 (13:50 -0700)]
spirv: Add workaround to ignore OpReturn after OpEmitMeshTasksEXT

Fixes: 7d1bcf1f55b ("spirv, nir: Handle EmitMeshTasksEXT opcode.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>

22 months agospirv: Treat EmitMeshTasksEXT as a terminating instruction.
Timur Kristóf [Tue, 6 Sep 2022 14:12:02 +0000 (16:12 +0200)]
spirv: Treat EmitMeshTasksEXT as a terminating instruction.

glslang had a bug and didn't actually emit it as a terminating
instruction, therefore this went unnoticed thus far.  See
https://github.com/KhronosGroup/glslang/issues/3020.

Modified by Caio Oliveira to emit the corresponding NIR intrinsic
right before the halt.

Fixes: 7d1bcf1f55b ("spirv, nir: Handle EmitMeshTasksEXT opcode.")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>

22 months agospirv: Pass vtn_block into vtn_emit_branch()
Caio Oliveira [Mon, 19 Sep 2022 20:35:13 +0000 (13:35 -0700)]
spirv: Pass vtn_block into vtn_emit_branch()

This will be used later to handle branches instructions that have
parameters in them, e.g. SpvOpEmitMeshTasksEXT.  No behavior change in
this commit.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>

22 months agonir/lower_task_shader: Don't fail adding a launch when last instruction is a jump
Caio Oliveira [Wed, 21 Sep 2022 14:43:52 +0000 (07:43 -0700)]
nir/lower_task_shader: Don't fail adding a launch when last instruction is a jump

Fixes: 8aff8d3dd42 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>

22 months agogallivm: LLVM opaque pointers: use lp_build_array_get_ptr2() in lp_bld_nir_soa.c
Mihai Preda [Tue, 6 Sep 2022 16:00:30 +0000 (19:00 +0300)]
gallivm: LLVM opaque pointers: use lp_build_array_get_ptr2() in lp_bld_nir_soa.c

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

22 months agogallivm: LLVM opaque pointers: add lp_build_array_get[_ptr]2 in lp_bld_struct.c
Mihai Preda [Tue, 6 Sep 2022 15:57:42 +0000 (18:57 +0300)]
gallivm: LLVM opaque pointers: add lp_build_array_get[_ptr]2 in lp_bld_struct.c

i.e. variants taking an explicit LLVM type

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

22 months agogallivm: LLVM opaque pointer fixes in lp_bld_sample.c
Mihai Preda [Wed, 31 Aug 2022 12:38:52 +0000 (15:38 +0300)]
gallivm: LLVM opaque pointer fixes in lp_bld_sample.c

load_mip()

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

22 months agogallium/draw: fix LLVM opaque pointer warnings in store_aos()
Mihai Preda [Wed, 14 Sep 2022 10:01:49 +0000 (13:01 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in store_aos()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_store_output()
Mihai Preda [Wed, 21 Sep 2022 11:00:02 +0000 (14:00 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_store_output()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_output()
Mihai Preda [Wed, 21 Sep 2022 10:26:00 +0000 (13:26 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_output()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_input()
Mihai Preda [Wed, 21 Sep 2022 10:08:59 +0000 (13:08 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_input()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_epilogue()
Mihai Preda [Wed, 21 Sep 2022 09:59:37 +0000 (12:59 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_epilogue()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_end_primitive()
Mihai Preda [Wed, 21 Sep 2022 09:43:47 +0000 (12:43 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_end_primitive()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_fetch_input()
Mihai Preda [Wed, 14 Sep 2022 11:55:59 +0000 (14:55 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_fetch_input()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in generate_clipmask()
Mihai Preda [Wed, 14 Sep 2022 10:30:51 +0000 (13:30 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in generate_clipmask()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agogallium/draw: fix LLVM opaque pointer warnings in store_clip()
Mihai Preda [Wed, 14 Sep 2022 10:14:04 +0000 (13:14 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in store_clip()

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>

22 months agoanv: add missing wokraround for texture cache invalidate
Lionel Landwerlin [Thu, 22 Sep 2022 05:13:22 +0000 (08:13 +0300)]
anv: add missing wokraround for texture cache invalidate

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18743>

22 months agoir3/analyze_ubo_ranges: Account for reserved consts
Connor Abbott [Thu, 22 Sep 2022 15:32:53 +0000 (17:32 +0200)]
ir3/analyze_ubo_ranges: Account for reserved consts

We weren't accounting for the reserved consts when calculating how much
we can upload. This led to assertion failures later if we pushed too
much.

Fixes: d3b7681df28 ("tu: ir3: Emit push constants directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>

22 months agotu: Set textures_used for input attachments correctly
Connor Abbott [Thu, 22 Sep 2022 13:19:09 +0000 (15:19 +0200)]
tu: Set textures_used for input attachments correctly

We were accidentally multiplying by 2 twice. Noticed by inspection.

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

22 months agotu: Fix maxPerStageDescriptorUpdateAfterBindInputAttachments
Connor Abbott [Thu, 22 Sep 2022 13:07:21 +0000 (15:07 +0200)]
tu: Fix maxPerStageDescriptorUpdateAfterBindInputAttachments

We need this to be the same as maxPerStageDescriptorInputAttachments.

Fixes: d9fcf5de55a ("turnip: Enable nonuniform descriptor indexing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>

22 months agod3d12: Fix texture array DPB encode path
Sil Vilerino [Thu, 22 Sep 2022 17:41:20 +0000 (13:41 -0400)]
d3d12: Fix texture array DPB encode path

Mark D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAG_USED_AS_REFERENCE_PICTURE when applicable

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>

22 months agod3d12: Add debug verbosity for output reconstructed picture
Sil Vilerino [Thu, 22 Sep 2022 17:34:28 +0000 (13:34 -0400)]
d3d12: Add debug verbosity for output reconstructed picture

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>

22 months agod3d12: Fix out of bounds index check for texture array DPB
Sil Vilerino [Thu, 22 Sep 2022 17:07:59 +0000 (13:07 -0400)]
d3d12: Fix out of bounds index check for texture array DPB

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>

22 months agod3d12: Relax slice caps requirements for video encode
Sil Vilerino [Thu, 22 Sep 2022 11:58:48 +0000 (07:58 -0400)]
d3d12: Relax slice caps requirements for video encode

The check in d3d12_has_video_encode_support was returning no encode support unless
the driver supported D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_PARTITIONING_SUBREGIONS_PER_FRAME
when it should also return support when the driver reports only full frame support
(ie. D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME)

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>

22 months agozink: delete some descriptor caching cruft
Mike Blumenkrantz [Thu, 1 Sep 2022 14:23:35 +0000 (10:23 -0400)]
zink: delete some descriptor caching cruft

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: delete more sw conditional render handling
Mike Blumenkrantz [Thu, 1 Sep 2022 14:22:51 +0000 (10:22 -0400)]
zink: delete more sw conditional render handling

I forgot to delete this when I deleted the draw path handling

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: remove batch usage from sampler states
Mike Blumenkrantz [Thu, 1 Sep 2022 13:37:06 +0000 (09:37 -0400)]
zink: remove batch usage from sampler states

this was useless

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: remove batch tracking/usage from view types
Mike Blumenkrantz [Thu, 1 Sep 2022 13:34:41 +0000 (09:34 -0400)]
zink: remove batch tracking/usage from view types

instead of incurring all the overhead of tracking lifetimes for these,
it makes more sense to just let them delete whenever and then store
the vk object onto its parent image/buffer to be deleted when that gets
freed, as the parent object's lifetime will always be >= the view's lifetime

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: split out bind_sampler_states hook for drivers without EXT_non_seamless_cube_map
Mike Blumenkrantz [Thu, 1 Sep 2022 13:15:30 +0000 (09:15 -0400)]
zink: split out bind_sampler_states hook for drivers without EXT_non_seamless_cube_map

this incurs some overhead and is seldom used, so avoid having it in the codepath
at all if it won't be used

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink bump batch state limit a bit
Mike Blumenkrantz [Thu, 1 Sep 2022 13:15:06 +0000 (09:15 -0400)]
zink bump batch state limit a bit

this should yield better throughput

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: rework batch tracking for resources
Mike Blumenkrantz [Wed, 31 Aug 2022 19:38:29 +0000 (15:38 -0400)]
zink: rework batch tracking for resources

this uses a revised version of radeonsi's buffer list array to track
resources for lifetime/usage management, massively improving performance
by avoiding hash table lookups

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: defer more semaphore destruction
Mike Blumenkrantz [Mon, 29 Aug 2022 15:40:50 +0000 (11:40 -0400)]
zink: defer more semaphore destruction

these have noticeable overhead, so handle them in the submit thread

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>

22 months agozink: rework flush_frontbuffer to always flush
Mike Blumenkrantz [Wed, 21 Sep 2022 13:07:35 +0000 (09:07 -0400)]
zink: rework flush_frontbuffer to always flush

previously this would no-op unacquired swapchains and then try to
execute a copy from the last-presented swapchain image to the current
image to avoid presenting garbage data

instead, just present garbage like the app requested

fixes #7165

Tested-By: Matti Hamalainen <ccr@tnsp.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18730>

22 months agozink: check format compatibility up front when creating framebuffer surface
Mike Blumenkrantz [Tue, 6 Sep 2022 16:14:01 +0000 (12:14 -0400)]
zink: check format compatibility up front when creating framebuffer surface

this avoids an assert in create_ivci while enforcing correct behavior

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18446>

22 months agoegl: Rewrite eglSetBlobCacheFuncsANDROID to use the standard macros
Adam Jackson [Tue, 20 Sep 2022 18:42:23 +0000 (14:42 -0400)]
egl: Rewrite eglSetBlobCacheFuncsANDROID to use the standard macros

As the deleted comment hints, you just need the macro to expand to

    return /* void */;

for things to work.

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

22 months agoegl: Factor out the eglTerminate write-lock pattern
Adam Jackson [Tue, 20 Sep 2022 18:14:51 +0000 (14:14 -0400)]
egl: Factor out the eglTerminate write-lock pattern

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

22 months agoegl: Untangle some spaghetti around _eglLookupDisplay
Adam Jackson [Tue, 20 Sep 2022 17:51:00 +0000 (13:51 -0400)]
egl: Untangle some spaghetti around _eglLookupDisplay

Only eglapi needs any of this.

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

22 months agoegl: Promote _eglLock/UnlockDisplay to internal API
Adam Jackson [Tue, 20 Sep 2022 17:38:04 +0000 (13:38 -0400)]
egl: Promote _eglLock/UnlockDisplay to internal API

This reads a bit more cleanly than egl_lock/egl_unlock I think.

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

22 months agoegl: Fix a bunch of maybe-uninitialized warnings
Adam Jackson [Fri, 16 Sep 2022 17:06:18 +0000 (13:06 -0400)]
egl: Fix a bunch of maybe-uninitialized warnings

Fedora's gcc 12 is apparently not smart enough to deduce that these are
always initialized, so set some clear default values.

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

22 months agoUpdate 22.2.0.rst
Yonggang Luo [Wed, 21 Sep 2022 18:26:44 +0000 (18:26 +0000)]
Update 22.2.0.rst

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

22 months agodocs: Add calendar entries for 22.2 release.
Dylan Baker [Wed, 21 Sep 2022 16:24:29 +0000 (09:24 -0700)]
docs: Add calendar entries for 22.2 release.

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

22 months agodocs: update calendar and link releases notes for 22.2.0
Dylan Baker [Wed, 21 Sep 2022 16:23:31 +0000 (09:23 -0700)]
docs: update calendar and link releases notes for 22.2.0

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

22 months agodocs: Add sha256 sum for 22.2.0
Dylan Baker [Wed, 21 Sep 2022 16:17:10 +0000 (09:17 -0700)]
docs: Add sha256 sum for 22.2.0

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

22 months agodocs: add release notes for 22.2.0
Dylan Baker [Wed, 21 Sep 2022 16:16:34 +0000 (09:16 -0700)]
docs: add release notes for 22.2.0

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

22 months agovenus: ensure to clear VkPipelineCreationFeedback::flags if needed
Yiwei Zhang [Thu, 22 Sep 2022 05:43:56 +0000 (05:43 +0000)]
venus: ensure to clear VkPipelineCreationFeedback::flags if needed

Fixes: d0cb99e96a2 ("venus: Enable VK_EXT_pipeline_creation_feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18741>

22 months agoturnip: Fix busy-waiting on syncobjs with OS_TIMEOUT_INFINITE.
Emma Anholt [Wed, 21 Sep 2022 23:42:34 +0000 (16:42 -0700)]
turnip: Fix busy-waiting on syncobjs with OS_TIMEOUT_INFINITE.

I noticed that glmark2's glFinish()es in its offscreen rendering tests
under zink were spinning.  When we passed -1 as the timeout for
drmSyncobjWait(), the kernel would immediately return ETIME.

Fixes: 0a82a26a1854 ("turnip: Porting to common implementation for timeline semaphore")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18739>

22 months agofrontends/va: fix build error for vaSyncBuffer with older VA
Leo Liu [Thu, 22 Sep 2022 16:53:25 +0000 (12:53 -0400)]
frontends/va: fix build error for vaSyncBuffer with older VA

return VA_STATUS_ERROR_TIMEDOUT;
      |              ^~~~~~~~~~~~~~~~~~~~~~~~
      |              VA_STATUS_ERROR_UNKNOWN
../src/gallium/frontends/va/buffer.c:434:14: note: each undeclared identifier is reported only once for each function it appears in
../src/gallium/frontends/va/buffer.c:436:22: error: ‘VA_TIMEOUT_INFINITE’ undeclared (first use in this function); did you mean ‘PIPE_TIMEOUT_INFINITE’?
  436 |    if (timeout_ns != VA_TIMEOUT_INFINITE)
      |                      ^~~~~~~~~~~~~~~~~~~
      |                      PIPE_TIMEOUT_INFINITE

Fixes: 229c6f79a ("frontends/va: Implement vaSyncBuffer")

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18760>

22 months agofreedreno: Handle xfb invalidation
Rob Clark [Tue, 20 Sep 2022 21:15:43 +0000 (14:15 -0700)]
freedreno: Handle xfb invalidation

So using the same buffer for CPU writes and GPU writes might be kinda
unusual.  But I noticed we were missing handling for the case while
debugging something unrelated.

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

22 months agolavapipe/meson: rename module_dir to icd_lib_path and swap two lines for consistence
Yonggang Luo [Thu, 22 Sep 2022 08:41:55 +0000 (16:41 +0800)]
lavapipe/meson: rename module_dir to icd_lib_path and swap two lines for consistence

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18747>

22 months agodzn: rename module_dir to icd_lib_path for consistence
Yonggang Luo [Thu, 22 Sep 2022 08:42:32 +0000 (16:42 +0800)]
dzn: rename module_dir to icd_lib_path for consistence

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18747>

22 months agoradv: Getting radeon_icd to be generated properly on win32
Yonggang Luo [Thu, 22 Sep 2022 03:58:57 +0000 (11:58 +0800)]
radv: Getting radeon_icd to be generated properly on win32

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18747>

22 months agomesa/st: fix a set_sampler_views call parameter order
Tapani Pälli [Thu, 22 Sep 2022 08:17:21 +0000 (11:17 +0300)]
mesa/st: fix a set_sampler_views call parameter order

Fixes: e7b95619596 ("gallium: implement compute pbo download")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18745>

22 months agopvr: Implement vkCmdNextSubpass API.
Rajnesh Kanwal [Thu, 1 Sep 2022 12:13:12 +0000 (13:13 +0100)]
pvr: Implement vkCmdNextSubpass API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Pass load-op struct instead of idx to support subpass load-ops.
Rajnesh Kanwal [Tue, 30 Aug 2022 18:58:56 +0000 (19:58 +0100)]
pvr: Pass load-op struct instead of idx to support subpass load-ops.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Add support to create subpass load ops.
Rajnesh Kanwal [Tue, 30 Aug 2022 14:50:15 +0000 (15:50 +0100)]
pvr: Add support to create subpass load ops.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Add attachment resolve support.
Rajnesh Kanwal [Fri, 2 Sep 2022 14:15:42 +0000 (15:15 +0100)]
pvr: Add attachment resolve support.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Add const to structs that are not supposed to be modified.
Rajnesh Kanwal [Fri, 2 Sep 2022 14:12:06 +0000 (15:12 +0100)]
pvr: Add const to structs that are not supposed to be modified.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Rename userpass_spawn to isp_userpass.
Rajnesh Kanwal [Tue, 23 Aug 2022 10:35:25 +0000 (11:35 +0100)]
pvr: Rename userpass_spawn to isp_userpass.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Add missing output register write in pvr_CreateRenderPass2.
Rajnesh Kanwal [Wed, 3 Aug 2022 16:53:32 +0000 (17:53 +0100)]
pvr: Add missing output register write in pvr_CreateRenderPass2.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Use ~0 for masks instead of ~0U.
Rajnesh Kanwal [Thu, 4 Aug 2022 13:05:44 +0000 (14:05 +0100)]
pvr: Use ~0 for masks instead of ~0U.

This makes code future proof in case someone changes the type
and also avoids half masks (0x00000000FFFFFFFF) in case of
64bit variables.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reported-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Add support for generating render pass hw setup data.
Rajnesh Kanwal [Tue, 5 Jul 2022 11:26:37 +0000 (12:26 +0100)]
pvr: Add support for generating render pass hw setup data.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: Replace pvr_renderpass_surface_initop with VkAttachmentLoadOp.
Rajnesh Kanwal [Tue, 2 Aug 2022 12:52:03 +0000 (13:52 +0100)]
pvr: Replace pvr_renderpass_surface_initop with VkAttachmentLoadOp.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agopvr: General reformatting and renaming some fields.
Rajnesh Kanwal [Tue, 2 Aug 2022 12:27:35 +0000 (13:27 +0100)]
pvr: General reformatting and renaming some fields.

Mainly renaming driver_id and similar fields to index to
better represent what they contain.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>

22 months agodocs: update calendar and link releases notes for 22.1.7
Eric Engestrom [Thu, 22 Sep 2022 12:33:29 +0000 (14:33 +0200)]
docs: update calendar and link releases notes for 22.1.7

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

22 months agodocs: add release notes for 22.1.7
Eric Engestrom [Thu, 22 Sep 2022 12:58:07 +0000 (14:58 +0200)]
docs: add release notes for 22.1.7

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

22 months agodocs: update calendar and link releases notes for 22.1.6
Eric Engestrom [Thu, 22 Sep 2022 12:33:27 +0000 (14:33 +0200)]
docs: update calendar and link releases notes for 22.1.6

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

22 months agodocs: add release notes for 22.1.6
Eric Engestrom [Thu, 22 Sep 2022 12:55:57 +0000 (14:55 +0200)]
docs: add release notes for 22.1.6

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

22 months agoaco/optimizer: change inverse_comparison in-place
Daniel Schürmann [Wed, 24 Aug 2022 17:13:52 +0000 (19:13 +0200)]
aco/optimizer: change inverse_comparison in-place

This avoids creating a second comparison which is more expensive
than just using the existing s_not.

Totals from 1089 (0.81% of 134913) affected shaders: (GFX10.3)
VGPRs: 50472 -> 50184 (-0.57%)
CodeSize: 4724692 -> 4760824 (+0.76%); split: -0.03%, +0.79%
MaxWaves: 23964 -> 24012 (+0.20%)
Instrs: 859588 -> 859687 (+0.01%); split: -0.11%, +0.12%
Latency: 10674653 -> 10650353 (-0.23%); split: -0.41%, +0.18%
InvThroughput: 1752987 -> 1750238 (-0.16%); split: -0.20%, +0.04%
VClause: 20921 -> 20872 (-0.23%); split: -0.68%, +0.45%
SClause: 31417 -> 31550 (+0.42%)
Copies: 69428 -> 68738 (-0.99%); split: -1.52%, +0.53%
PreSGPRs: 48033 -> 49649 (+3.36%)
PreVGPRs: 44490 -> 43699 (-1.78%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18253>

22 months agoaco: Change inverse-comparison optimization to work with s_not
Timur Kristóf [Sat, 20 Aug 2022 20:55:45 +0000 (22:55 +0200)]
aco: Change inverse-comparison optimization to work with s_not

Some time ago we stopped using s_andn2 with exec for boolean NOT.
The reasoning behind that change was that those booleans will be
always ANDed with exec when necessary.

This inhibited the inverse-comparison optimization in most cases
which is fixed by this patch.

Fossil DB stats on Navi 21:

Totals from 12251 (9.08% of 134913) affected shaders:
VGPRs: 801744 -> 802016 (+0.03%); split: -0.00%, +0.04%
SpillSGPRs: 8863 -> 8893 (+0.34%)
CodeSize: 100593244 -> 100370684 (-0.22%); split: -0.22%, +0.00%
MaxWaves: 204994 -> 204948 (-0.02%); split: +0.00%, -0.02%
Instrs: 18717001 -> 18668965 (-0.26%); split: -0.26%, +0.00%
Latency: 263255046 -> 262874896 (-0.14%); split: -0.16%, +0.02%
InvThroughput: 52760249 -> 52721736 (-0.07%); split: -0.08%, +0.01%
VClause: 329631 -> 329680 (+0.01%); split: -0.03%, +0.04%
SClause: 681563 -> 681435 (-0.02%); split: -0.02%, +0.00%
Copies: 1331612 -> 1372446 (+3.07%); split: -0.03%, +3.10%
Branches: 548325 -> 548301 (-0.00%)
PreSGPRs: 911317 -> 909700 (-0.18%)
PreVGPRs: 766279 -> 767070 (+0.10%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18253>

22 months agoaco/optimizer: optimize s_and(exec, s_and(x, y)) more aggressively
Daniel Schürmann [Wed, 24 Aug 2022 13:12:40 +0000 (15:12 +0200)]
aco/optimizer: optimize s_and(exec, s_and(x, y)) more aggressively

It is enough if either of the two operands is respecting the
current exec mask.

Totals from 1680 (1.25% of 134913) affected shaders: (GFX10.3)
CodeSize: 3929436 -> 3922372 (-0.18%); split: -0.18%, +0.00%
Instrs: 730305 -> 728536 (-0.24%); split: -0.24%, +0.00%
Latency: 6839314 -> 6835154 (-0.06%); split: -0.07%, +0.01%
InvThroughput: 1371351 -> 1371267 (-0.01%); split: -0.01%, +0.00%
SClause: 32819 -> 32802 (-0.05%); split: -0.09%, +0.04%
Copies: 33264 -> 33271 (+0.02%); split: -0.01%, +0.03%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18253>

22 months agoaco/optimizer: do can_eliminate_and_exec() optimization later
Daniel Schürmann [Wed, 24 Aug 2022 10:25:23 +0000 (12:25 +0200)]
aco/optimizer: do can_eliminate_and_exec() optimization later

This will allow to optimize s_not(v_cmp()) safely.

Totals from 1024 (0.76% of 134913) affected shaders: (GFX10.3)
CodeSize: 5695424 -> 5701860 (+0.11%); split: -0.00%, +0.11%
Scratch: 242688 -> 241664 (-0.42%)
Instrs: 1040656 -> 1041635 (+0.09%); split: -0.00%, +0.09%
Latency: 16842282 -> 16922790 (+0.48%); split: -0.06%, +0.54%
InvThroughput: 4772728 -> 4810868 (+0.80%); split: -0.10%, +0.90%
VClause: 20013 -> 20000 (-0.06%); split: -0.12%, +0.05%
Copies: 115057 -> 114384 (-0.58%); split: -1.22%, +0.63%
Branches: 34531 -> 34532 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 46263 -> 46267 (+0.01%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18253>

22 months agozink: assert on unnormalized texcoords
Erik Faye-Lund [Fri, 22 Jul 2022 09:35:10 +0000 (11:35 +0200)]
zink: assert on unnormalized texcoords

We do not support PIPE_CAP_TEXRECT, so let's assert in case something
tries to use it behind our back.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17708>

22 months agomesa/st: always use normalized coords for samplers
Erik Faye-Lund [Tue, 20 Sep 2022 08:12:50 +0000 (10:12 +0200)]
mesa/st: always use normalized coords for samplers

Normalized samplers is the norm, and non-normalized samplers might cause
some drivers and hardware to have to bend over backwards a bit.

We're using TXF here anyway, so it doesn't really matter what we set
this state to. So let's always use normalized samplers instead of
always using non-normalized samplers. That makes things easier for
everyone.

Fixes: e7b95619596 ("gallium: implement compute pbo download")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17708>