platform/upstream/mesa.git
2 years agozink/codegen: remember the fields in feats/props structs of extensions
Hoe Hao Cheng [Sun, 1 May 2022 09:22:36 +0000 (17:22 +0800)]
zink/codegen: remember the fields in feats/props structs of extensions

this will be useful in the next commit, where we reapply fields from one struct
to another.

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

2 years agost/mesa: use mutex in st_get_texture_sampler_view_from_stobj
Pierre-Eric Pelloux-Prayer [Thu, 19 May 2022 08:57:40 +0000 (10:57 +0200)]
st/mesa: use mutex in st_get_texture_sampler_view_from_stobj

st_texture_release_all_sampler_views uses the validate_mutex,
but st_get_texture_sampler_view_from_stobj didn't.

Since they both modify stObj->view we could have threadA in
st_get_texture_sampler_view_from_stobj with a non-NULL sv,
so expecting sv->view to be non-NULL, while threadB was in
st_texture_release_all_sampler_views clearing sv->view.

It's also needed to protect st_sampler_view::private_refcount,
which is supposed to be used from the owning context thread,
but can also be used by any context in st_texture_release_all_sampler_views.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6088
Fixes: ef5d4274132 ("st/mesa: add a mechanism to bypass atomics when binding sampler views")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16779>

2 years agoanv: use anv_cmd_dirty_mask_t type for dynamic state
Tapani Pälli [Fri, 3 Jun 2022 05:43:07 +0000 (08:43 +0300)]
anv: use anv_cmd_dirty_mask_t type for dynamic state

We were using both uint32_t and anv_cmd_dirty_mask_t, this is
a cleanup making type usage consistent. Commit also changes type of
the mask to be enum anv_cmd_dirty_bits.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16849>

2 years agomicrosoft/spirv_to_dxil: Fix the push_constant UBO size calculation
Boris Brezillon [Wed, 25 May 2022 08:18:32 +0000 (10:18 +0200)]
microsoft/spirv_to_dxil: Fix the push_constant UBO size calculation

Right now, we just consider the size of the accessed portion of the
push constant array, but it doesn't necessarily reflect the size
of the UBO we should declare.

Fixes: de1e941c5909 ("microsoft/spirv_to_dxil: Lower push constant loads to UBO loads")
Reviewed-by: Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16703>

2 years agomicrosoft/spirv_to_dxil: Fix push_constants type declaration
Boris Brezillon [Wed, 25 May 2022 08:05:26 +0000 (10:05 +0200)]
microsoft/spirv_to_dxil: Fix push_constants type declaration

We're not declaring an array of bytes but an array of uint32. Let's
fix the element_count we pass to glsl_array_type().

Fixes: de1e941c5909 ("microsoft/spirv_to_dxil: Lower push constant loads to UBO loads")
Reviewed-by: Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16703>

2 years agonir/opt_vectorize: refactor src rewriting to avoid unnecessary mov instructions
Daniel Schürmann [Tue, 29 Mar 2022 17:01:59 +0000 (19:01 +0200)]
nir/opt_vectorize: refactor src rewriting to avoid unnecessary mov instructions

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15647>

2 years agoradv: enable radv_zero_vram for Hammerting
Samuel Pitoiset [Thu, 2 Jun 2022 07:03:16 +0000 (09:03 +0200)]
radv: enable radv_zero_vram for Hammerting

This native Vulkan game is broken, it has TON of Vulkan validation
errors and hangs without RADV_DEBUG=zerovram. Also tested with PRO
and AMDVLK.

The application name is also not really descriptive but the executable
name 'boot.exe' is worst.

https://github.com/ValveSoftware/Proton/issues/4347#issuecomment-1141415515

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16832>

2 years agospirv: Workaround for RelaxedPrecision on OpLogical* in 3DMark
Danylo Piliaiev [Fri, 27 May 2022 12:11:52 +0000 (15:11 +0300)]
spirv: Workaround for RelaxedPrecision on OpLogical* in 3DMark

Per spec RelaxedPrecision cannot be applied to bool types, however
3DMark Wild Life does it:

OpDecorate %171 RelaxedPrecision
...
%171 = OpLogicalAnd %bool %169 %170

Fixes crash in 3DMark Wild Life on Android.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16746>

2 years agomeson: add back -Werror=vla to msvc compat flags
Erik Faye-Lund [Mon, 23 May 2022 09:58:55 +0000 (11:58 +0200)]
meson: add back -Werror=vla to msvc compat flags

Back when STATIC_ASSERT was prepared for use in common code, the
-Werror=vla flag was removed from the MSVC compat flags. But now we're
using C++11 / C11 static asserts instead, so we can add it back again.

This should help us noticing some breakages before they happen.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agoutil: implement STATIC_ASSERT using c++11 / c11 primitives
Erik Faye-Lund [Mon, 23 May 2022 09:53:22 +0000 (11:53 +0200)]
util: implement STATIC_ASSERT using c++11 / c11 primitives

Since we now require C11 and C++14, we can use the standard
static_asserts from the standard library instead of rolling our own
compiler-specific versions.

To avoid needing scopes around usage in switch cases, keep the
while-wrapping from before. This means it still can't be used outside of
functions, but that should be fine; we should probably just use
static_assert directly in those cases anyway.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agoutil: use static_assert directly
Erik Faye-Lund [Tue, 31 May 2022 08:24:38 +0000 (10:24 +0200)]
util: use static_assert directly

For some reason, Clang doesn't love the STATIC_ASSERT implementation
we're about switch to in this *one* particular case. Other cases seems
to work fine, so let's just use static_assert directly here.

It lets us give a better error string anyway, so yay.

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

2 years agobroadcom/compiler: use macro for power-of-two check
Erik Faye-Lund [Tue, 31 May 2022 11:20:00 +0000 (13:20 +0200)]
broadcom/compiler: use macro for power-of-two check

This will allow the use of static_assert here instead of our
compiler-specific implementation.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agointel/compiler: use macro for power-of-two check
Erik Faye-Lund [Tue, 31 May 2022 11:17:30 +0000 (13:17 +0200)]
intel/compiler: use macro for power-of-two check

This will allow the use of static_assert here instead of our
compiler-specific implementation.

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

2 years agoutil: add IS_POT macro
Erik Faye-Lund [Tue, 31 May 2022 10:31:41 +0000 (12:31 +0200)]
util: add IS_POT macro

This macro kinda complements util_is_power_of_two_*, but is implemented
as a macro. This means that it can expand to a constant integral
expression, and thus be used in static_assert.

Because we don't really need the added complexity, this doesn't handle
zero correctly. But that's OK, because the call-sites will.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agov3dv: do not do STATIC_ASSERT on variables
Erik Faye-Lund [Mon, 23 May 2022 12:58:48 +0000 (14:58 +0200)]
v3dv: do not do STATIC_ASSERT on variables

Use an enum value instead, so it's guaranteed to be constant.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agofreedreno: degrade STATIC_ASSERT to assert
Erik Faye-Lund [Mon, 23 May 2022 12:36:52 +0000 (14:36 +0200)]
freedreno: degrade STATIC_ASSERT to assert

dirty is a variable, and C standard doesn't guarantee that the compiler
can see that it's always passed a constant. So this isn't appropriate to
use for static_assert, which we're about to convert STATIC_ASSERT to
expand to.

If we really want to do this compile-time, we need to make
fd_context_dirty a macro instead. But it seems reaonable to just use a
run-time assert instead here.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agoiris: do not do STATIC_ASSERT on variables
Erik Faye-Lund [Mon, 23 May 2022 12:53:49 +0000 (14:53 +0200)]
iris: do not do STATIC_ASSERT on variables

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agofreedreno: do not do STATIC_ASSERT on variables
Erik Faye-Lund [Mon, 23 May 2022 12:49:06 +0000 (14:49 +0200)]
freedreno: do not do STATIC_ASSERT on variables

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agofreedreno: do not use variable in STATIC_ASSERT
Erik Faye-Lund [Mon, 23 May 2022 12:11:12 +0000 (14:11 +0200)]
freedreno: do not use variable in STATIC_ASSERT

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agoturnip: do not do STATIC_ASSERT on a variable
Erik Faye-Lund [Mon, 23 May 2022 11:36:09 +0000 (13:36 +0200)]
turnip: do not do STATIC_ASSERT on a variable

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agopvr: do not use c_msvc_compat_args
Erik Faye-Lund [Mon, 23 May 2022 12:01:36 +0000 (14:01 +0200)]
pvr: do not use c_msvc_compat_args

This code isn't MSVC compatible, as it uses VLAs (for instance).

Until there's a reason to support MSVC, let's not even try. Otherwise,
we make it harder than needed to add flags to make the MSVC compat flags
more complete.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>

2 years agoradv: Remove usage of `cnd_monotonic.h`
Yonggang Luo [Sat, 9 Apr 2022 13:53:03 +0000 (21:53 +0800)]
radv: Remove usage of `cnd_monotonic.h`

Improve: 91fe0b5629d ("radv: Delete lots of sync code.")

As cnd_monotonic.h are include `util/os_time.h`, radv_debug.c and radv_debug.c needs `util/os_time.h`
So include in these files directly.

The compiling errors are:
```
../src/amd/vulkan/radv_debug.c:707:12: error: implicit declaration of function 'os_localtime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   timep = os_localtime(&raw_time, &result);

../src/amd/vulkan/radv_device.c:97:11: error: implicit declaration of function 'os_time_get_nano' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   return os_time_get_nano();
          ^

../../src/amd/vulkan/radv_pipeline.c: In function 'radv_create_shaders':
../../src/amd/vulkan/radv_pipeline.c:4119:29: error: implicit declaration of function 'os_time_get_nano' [-Werror=implicit-function-declaration]
 4119 |    int64_t pipeline_start = os_time_get_nano();
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16536>

2 years agoaux/trace: implement pipe_screen::is_compute_copy_faster
Mike Blumenkrantz [Fri, 13 May 2022 20:40:18 +0000 (16:40 -0400)]
aux/trace: implement pipe_screen::is_compute_copy_faster

stop crashing!

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

2 years agoaux/trace: fix sampler view dumping
Mike Blumenkrantz [Fri, 13 May 2022 16:29:24 +0000 (12:29 -0400)]
aux/trace: fix sampler view dumping

this should just dump the samplerview target, not the resource target too

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

2 years agozink: fix framebuffer attachment usage asserts for dummy attachments
Mike Blumenkrantz [Fri, 27 May 2022 14:04:05 +0000 (10:04 -0400)]
zink: fix framebuffer attachment usage asserts for dummy attachments

dummy attachments never overwrite existing attachments,
so they must be explicitly compared like this to avoid
erroneous crashing

Fixes: 3892c133811 ("zink: add an alternate path for EXT_color_write_enable usage")

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

2 years agonouveau/codegen: drop gallium headers from the interface.
Dave Airlie [Sat, 28 May 2022 04:23:18 +0000 (14:23 +1000)]
nouveau/codegen: drop gallium headers from the interface.

I know pipe defines are still used internally, but I'd want
better testing, before starting to remove that.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>

2 years agonouveau/codegen: drop all ubytes from codegen.
Dave Airlie [Mon, 30 May 2022 00:06:07 +0000 (10:06 +1000)]
nouveau/codegen: drop all ubytes from codegen.

There wasn't that many, so get rid of them in favour of real types.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>

2 years agonouveau: move codegen to a common higher level directory.
Dave Airlie [Sat, 28 May 2022 04:06:24 +0000 (14:06 +1000)]
nouveau: move codegen to a common higher level directory.

This allows it to be built independently of the gallium driver.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>

2 years agonouveau: move codegen into a standalone library.
Dave Airlie [Sat, 28 May 2022 03:19:21 +0000 (13:19 +1000)]
nouveau: move codegen into a standalone library.

This just moves the codegen build into a separate library,
this is just prep work for a future where another drivers wants
to reuse this code.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>

2 years agollvmpipe: handle timespec overflow on fence waits.
Dave Airlie [Fri, 3 Jun 2022 02:25:32 +0000 (12:25 +1000)]
llvmpipe: handle timespec overflow on fence waits.

on 32-bit systems VK CTS was failing due to an overflow here,
detect the overflow and just do a normal wait.

Fixes: 5b284fe6bc0a ("llvmpipe: add lp_fence_timedwait() helper")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16847>

2 years agoturnip: clamp to 1 for negative bottom-right of viewport.
Hyunjun Ko [Wed, 1 Jun 2022 01:37:16 +0000 (01:37 +0000)]
turnip: clamp to 1 for negative bottom-right of viewport.

This fixes a crash of spec@!opengl 3.0@viewport-clamp in
piglit(with zink).
Also fixes a crash of negativeviewportheight in Sascha's examples.

Closes: #6583

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

2 years agozink: expand patch_vertices pipeline key bitsize
Mike Blumenkrantz [Thu, 2 Jun 2022 15:24:41 +0000 (11:24 -0400)]
zink: expand patch_vertices pipeline key bitsize

no need to compact the bits anymore, so make this a uint16

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

2 years agozink: use dynamic patch vertices if available
Mike Blumenkrantz [Tue, 31 May 2022 19:42:22 +0000 (15:42 -0400)]
zink: use dynamic patch vertices if available

this one's a little different from other dynamic states in that it
isn't expected to change much, so I've kept it outside of draw handling
since it can be trivially applied elsewhere with no chance of impacting perf

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

2 years agozink: break out pipeline dynamic state2 into struct
Mike Blumenkrantz [Tue, 31 May 2022 19:23:38 +0000 (15:23 -0400)]
zink: break out pipeline dynamic state2 into struct

easier to expand

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

2 years agozink: use dynamic cull mode
Mike Blumenkrantz [Tue, 31 May 2022 19:17:50 +0000 (15:17 -0400)]
zink: use dynamic cull mode

more dynamic states = fewer pipeline cache misses

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

2 years agozink: use memcmp for comparing dynamic state1 info
Mike Blumenkrantz [Tue, 31 May 2022 19:16:03 +0000 (15:16 -0400)]
zink: use memcmp for comparing dynamic state1 info

easier to expand

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

2 years agozink: break out dynamic state1 pipeline info to struct
Mike Blumenkrantz [Tue, 31 May 2022 19:15:04 +0000 (15:15 -0400)]
zink: break out dynamic state1 pipeline info to struct

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

2 years agozink: improve packing for pipeline dynamic state1 info
Mike Blumenkrantz [Tue, 31 May 2022 19:13:10 +0000 (15:13 -0400)]
zink: improve packing for pipeline dynamic state1 info

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

2 years agozink: reorder pipeline dynamic state1 substruct
Mike Blumenkrantz [Tue, 31 May 2022 19:11:55 +0000 (15:11 -0400)]
zink: reorder pipeline dynamic state1 substruct

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

2 years agozink: tu ci updates
Mike Blumenkrantz [Thu, 2 Jun 2022 20:57:16 +0000 (16:57 -0400)]
zink: tu ci updates

734

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

2 years agozink: force queries to start/end out of renderpass
Mike Blumenkrantz [Thu, 2 Jun 2022 18:04:04 +0000 (14:04 -0400)]
zink: force queries to start/end out of renderpass

spec requires queries to either start and end in the same renderpass
or start and end outside of renderpass, so do the latter since it's
easier to track

cc: mesa-stable

fixes #6579

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

2 years agopan/bi: Fix clper_xor on Mali-G31
Alyssa Rosenzweig [Fri, 3 Jun 2022 00:27:41 +0000 (20:27 -0400)]
pan/bi: Fix clper_xor on Mali-G31

Mali-G31 has the old CLPER instruction, not the new one, which means we don't
get to specify a custom lane op. But the clper_xor helper incorrectly checked
the arch, not the implementation quirk.

Fixes: c00e7b729fe ("pan/bi: Optimize abs(derivative)")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16846>

2 years agoi915g: Ignore the new SEPARABLE_PROGRAM property.
Emma Anholt [Thu, 2 Jun 2022 22:59:43 +0000 (15:59 -0700)]
i915g: Ignore the new SEPARABLE_PROGRAM property.

We didn't need to know about it before, and we still don't.

Fixes: b63403054237 ("tgsi: Add SEPARABLE_PROGRAM property")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16845>

2 years agointel/compiler: call ordered_unit() only once at update_inst_scoreboard()
Paulo Zanoni [Fri, 8 Apr 2022 22:48:05 +0000 (15:48 -0700)]
intel/compiler: call ordered_unit() only once at update_inst_scoreboard()

Call it once instead of calling the very same function for each source
and destination. This should make those ternary operators a little
easier to read, IMHO.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15835>

2 years agointel/compiler: split handling of 64 bit floats and ints
Paulo Zanoni [Mon, 21 Mar 2022 20:17:30 +0000 (13:17 -0700)]
intel/compiler: split handling of 64 bit floats and ints

In opt_algebraic(), handle TYPE_DF in a different check than TYPE_Q. We have a
separate flag for each type, use separate checks so platforms where one is true
and the other is not can work properly.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15835>

2 years agointel/compiler: compute int64_options based on devinfo->has_64bit_int
Paulo Zanoni [Thu, 10 Mar 2022 00:56:08 +0000 (16:56 -0800)]
intel/compiler: compute int64_options based on devinfo->has_64bit_int

Don't compute it based on devinfo->has_64bit_float. Othwerwise we may
end up emitting 64bit-int (Q) instructions on platforms with 64bit
floats but not 64bit integers.

Right now, the only platforms where has_64bit_int is different from
has_64bit_float are the platforms that use GFX7_FEATURES.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15835>

2 years agointel/compiler: Fix uncompaction of signed word immediates on Tigerlake
Kenneth Graunke [Thu, 2 Jun 2022 09:11:15 +0000 (02:11 -0700)]
intel/compiler: Fix uncompaction of signed word immediates on Tigerlake

This expression accidentally performs a 32-bit sign-extension when
processing the second half of the expression (the low 16 bits).

Consider -7W, which is represented as 0xfff9fff9 in our encoding (the
16-bit word is replicated to both halves of the 32-bit dword).

Tigerlake's compaction stores the low 11-bits of an immediate as-is,
and replicates the 12th bit.  So here, compacted_imm will be 0xff9.

   (  (int)(0xff9 << 20) >> 4) |
   ((short)(0xff9 <<  4) >> 4))

   0xfff90000 | (0xff90 >> 4)
   0xfff90000 | 0xfffffff9 ...oops...
   0xfffffff9

By casting the second line of the expression to unsigned short, we
prevent the sign-extension when it combines both parts, so we get:

   0xfff90000 | 0x0000fff9
   0xfff9fff9

Fixes: 12d3b11908e ("intel/compiler: Add instruction compaction support on Gen12")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16833>

2 years agozink: fix radv piglit fails
Mike Blumenkrantz [Thu, 2 Jun 2022 19:52:37 +0000 (15:52 -0400)]
zink: fix radv piglit fails

I deleted the wrong one by accident

fixes 0c4a65ef34521b47fda4c5b59acfc4a8e97703f5

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

2 years agoci/vs2019: Clear CI_COMMIT_MESSAGE and CI_COMMIT_DESCRIPTION for please meson
Yonggang Luo [Wed, 1 Jun 2022 21:31:14 +0000 (05:31 +0800)]
ci/vs2019: Clear CI_COMMIT_MESSAGE and CI_COMMIT_DESCRIPTION for please meson

Fixes https://gitlab.freedesktop.org/lygstate/mesa/-/jobs/23444155/raw
https://gist.github.com/lygstate/201dd9d2db3d411668f7bbdc17daf74a

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16825>

2 years agovenus: Add driconf option to enable implicit fencing
Renato Pereyra [Fri, 27 May 2022 01:22:16 +0000 (18:22 -0700)]
venus: Add driconf option to enable implicit fencing

Signed-off-by: Renato Pereyra <renatopereyra@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16735>

2 years agomesa: throw a log warning any time a fallback texture is used
Mike Blumenkrantz [Wed, 11 May 2022 14:29:16 +0000 (10:29 -0400)]
mesa: throw a log warning any time a fallback texture is used

this generally means an app is broken in some way, so throw a log
message to be helpful

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

2 years agopan/bi: Rework Valhall register alignment
Alyssa Rosenzweig [Mon, 9 May 2022 14:18:13 +0000 (10:18 -0400)]
pan/bi: Rework Valhall register alignment

Because we lower SPLIT and COLLECT before RA, we need to consider offsets when
determining the dimensions of vectors, in order to align properly. Lowering
COLLECT post-RA would avoid this special case.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16780>

2 years agopan/bi: Align 64-bit register sources
Alyssa Rosenzweig [Sun, 13 Mar 2022 23:27:32 +0000 (19:27 -0400)]
pan/bi: Align 64-bit register sources

Similar idea to aligning staging register sources.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16780>

2 years agopan/bi: Allow vec6 for collects
Alyssa Rosenzweig [Tue, 31 May 2022 19:04:59 +0000 (15:04 -0400)]
pan/bi: Allow vec6 for collects

Hit for some Valhall texturing instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16780>

2 years agopan/bi: Use nodearrays for linear constraints
Icecream95 [Thu, 2 Jun 2022 15:57:08 +0000 (11:57 -0400)]
pan/bi: Use nodearrays for linear constraints

Speeds up compiling shaders/skia/781.shader_test in shader-db by 8x
(Icecream95).

...At least it did before I extended to support register allocation of vec8.  On
Valhall, texture instructions require up to 8 consecutive registers. To handle
this, provide for vec8 register allocation. Liveness was already (accidentally?)
vec8. The increased memory requirement is acceptable given that the interference
matrix is now stored sparsely (Alyssa).

Icecream95 reports the vec8 changes hurt RA performance by about 1% on average.
I consider this acceptable for now.

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

2 years agopan/bi: Add nodearray datastructure
Icecream95 [Thu, 2 Jun 2022 15:56:27 +0000 (11:56 -0400)]
pan/bi: Add nodearray datastructure

This is an array which can either be sparse or dense, and was designed
to be used to track liveness and interference information.

Either a sparse array with sorted indices or dense array is used.
Other data structures were tried, such as red-black trees or hash
tables, but they were slower. When used for storing constraints, the
indices do not have to be sorted as duplicating elements is okay, but
the speedup from that was not enough to justify the extra complexity.

v2: Add a comment about how to potentially speed it up. But it seems
  fast enough even without this change.
v3: Use a custom struct rather than relying on util_dynarray.
v4: Split out functions only used for liveness analysis, rather than the simpler
  data structure needed for the register interference matrix. If we need to
  optimize liveness, that can follow on after. Also make it for vec8 (Alyssa).

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

2 years agopan/bi: Reverse linear constraint bits
Icecream95 [Sun, 2 Jan 2022 22:57:24 +0000 (11:57 +1300)]
pan/bi: Reverse linear constraint bits

This will make it simpler to implement parallel RA where multiple
possible registers for a node are tested at once.

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

2 years agod3d12: Align output buffer offset access to D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE...
Sil Vilerino [Fri, 20 May 2022 14:38:48 +0000 (07:38 -0700)]
d3d12: Align output buffer offset access to D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS.CompressedBitstreamBufferAccessAlignment

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16644>

2 years agotu: Enable shaderTessellationAndGeometryPointSize
Connor Abbott [Thu, 2 Jun 2022 00:54:54 +0000 (02:54 +0200)]
tu: Enable shaderTessellationAndGeometryPointSize

This already works and AFAICT there was no reason to disable it other
than that the blob does.

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

2 years agotu: Fix D32S8 resolves into D32 or S8 in sysmem mode
Danylo Piliaiev [Thu, 2 Jun 2022 10:52:05 +0000 (13:52 +0300)]
tu: Fix D32S8 resolves into D32 or S8 in sysmem mode

Fixes CTS tests in sysmem mode:
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_zero_stencil_zero_testing_depth
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_depth
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_zero_stencil_zero_testing_depth
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_depth
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16834>

2 years agoradv/ci: update list of failures for Pitcairn
Samuel Pitoiset [Thu, 2 Jun 2022 11:16:11 +0000 (13:16 +0200)]
radv/ci: update list of failures for Pitcairn

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

2 years agoradv,aco: disable shader cache when ACO debug options are used
Rhys Perry [Tue, 18 Jan 2022 14:53:38 +0000 (14:53 +0000)]
radv,aco: disable shader cache when ACO debug options are used

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-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/14594>

2 years agonir: xfb_buffer_info::stride is in bytes
Jason Ekstrand [Wed, 1 Jun 2022 18:32:20 +0000 (13:32 -0500)]
nir: xfb_buffer_info::stride is in bytes

For the NIR XFB gathering as well as all the Vulkan drivers, buffer
strides in nir_xfb_info are in bytes.  When Marek started using
nir_xfb_info for GLSL on radeonsi, he copied directly from the GLSL
struct which has strides in dwords.  This inconsistency didn't show up
until I went through and started us using the NIR passes for GL drivers
directly without going through the GLSL structs.  We could change the
nir_xfb_buffer_info field to be in dwords to be consistent with
shader_info but that would mean changing all the Vulkan drivers but, for
now, it's easier to always use bytes in nir_xfb_info.

Fixes: 2a22885a457e ("st,nir: Use nir_shader::xfb_info in nir_lower_io_passes")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16819>

2 years agonir/glsl: Use rzalloc for nir_xfb_info
Jason Ekstrand [Wed, 1 Jun 2022 18:26:46 +0000 (13:26 -0500)]
nir/glsl: Use rzalloc for nir_xfb_info

A lot of the fields get fully overwritten but outputs/buffers_written
are both bitfields that we set one bit at a time.

Fixes: 7c5dc0b11a11 ("glsl/nir: Populate nir_shader::xfb_info after linking varyings")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16819>

2 years agolavapipe: fix dynamic patchControlPoints
Mike Blumenkrantz [Wed, 1 Jun 2022 20:25:58 +0000 (16:25 -0400)]
lavapipe: fix dynamic patchControlPoints

the dynamic state value is independent of whether tesselation is used

cc: mesa-stable

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

2 years agoinclude: drop c11_compat.h
Erik Faye-Lund [Wed, 1 Jun 2022 11:38:39 +0000 (13:38 +0200)]
include: drop c11_compat.h

We now require C11, and C++ supports static_assert just fine, which is
the only thing this header ever added support for. So let's get rid of
this needless header.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agoinclude: drop c99_math.h
Erik Faye-Lund [Wed, 1 Jun 2022 12:46:46 +0000 (14:46 +0200)]
include: drop c99_math.h

Since we now depend on C11, we know that we have support for the C99
math functionality. So let's drop the c99_math.h compatibility wrapper,
and just include <math.h> directly.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agovulkan/device_select: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:22:19 +0000 (14:22 +0200)]
vulkan/device_select: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agointel/isl: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:21:51 +0000 (14:21 +0200)]
intel/isl: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agoinclude: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:21:31 +0000 (14:21 +0200)]
include: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agogallium: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:20:58 +0000 (14:20 +0200)]
gallium: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agomapi: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:20:27 +0000 (14:20 +0200)]
mapi: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agogallium/util: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:19:59 +0000 (14:19 +0200)]
gallium/util: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agoegl: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:19:02 +0000 (14:19 +0200)]
egl: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agoutil: remove needless c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:17:43 +0000 (14:17 +0200)]
util: remove needless c99_compat.h includes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agoutil: add missing c99_compat.h includes
Erik Faye-Lund [Wed, 1 Jun 2022 12:04:53 +0000 (14:04 +0200)]
util: add missing c99_compat.h includes

These headers use the "restrict" keyword, so they need to include
c99_compat.h in case they get included from C++.

Right now, we include c99_compat.h in many needless places, which saves
us. But we're about to stop doing that.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agoc99_compat.h: remove inline and __func__ shims
Erik Faye-Lund [Wed, 1 Jun 2022 11:33:48 +0000 (13:33 +0200)]
c99_compat.h: remove inline and __func__ shims

We're requiring C11 now, and both "inline" and __func__ is supported
in C++ code as well. So no need for these compatibility-shims anymore.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agomeson: modernize win_flex stdint.h logic
Erik Faye-Lund [Wed, 1 Jun 2022 11:14:27 +0000 (13:14 +0200)]
meson: modernize win_flex stdint.h logic

Since this logic was written, we've moved to require C11, so this can
now be simplified. First of all, we no longer need to set
__STDC_VERSION__ for C code at all, because the issue that MSVC doesn't
set __STDC_VERSION__ for C99 is longer a concern. Second, we can make
the C++ check unconditional.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

2 years agointel: remove stale makefile
Erik Faye-Lund [Tue, 31 May 2022 06:54:30 +0000 (08:54 +0200)]
intel: remove stale makefile

When this landed, the Autotools build system was already removed. Why
was this file added in the first place? Probably a rebase-mistake...

Fixes: 134e750e16b ("i965: extract performance query metrics")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16790>

2 years agofreedreno: remove stale makefile
Erik Faye-Lund [Tue, 31 May 2022 05:27:42 +0000 (07:27 +0200)]
freedreno: remove stale makefile

We don't use this makefile, so there's no point in keeping it in the
repo. It's also a generated one, so it contains a lot of... mess.

Fixes: 536f43cb96b ("freedreno: slurp in afuc")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16790>

2 years agoradeonsi: port amdgcn_glslc build to meson
Erik Faye-Lund [Tue, 31 May 2022 07:03:19 +0000 (09:03 +0200)]
radeonsi: port amdgcn_glslc build to meson

Seems nice to reduce the number of old-fashioned build systems we have
in-tree.

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

2 years agoradv/ci: try to guess failure expectations for Fiji/Raven/Navi14/Navi22
Martin Roukala (né Peres) [Thu, 2 Jun 2022 05:42:29 +0000 (08:42 +0300)]
radv/ci: try to guess failure expectations for Fiji/Raven/Navi14/Navi22

The guesses are based on other gpus from the same gfx version. We will
need actual runs on the GPUs to confirm this.

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

2 years agoradv/ci: remove an expected fail from all families
Martin Roukala (né Peres) [Thu, 2 Jun 2022 05:25:13 +0000 (08:25 +0300)]
radv/ci: remove an expected fail from all families

dEQP-VK.glsl.builtin.precision_double.determinant.compute.mat3 was
failing because of a CTS bug, which got fixed in the latest update for
all our CI machines.

This commit assumes this got fixed for all families, even the ones we
did not try to run on.

Fixes: 836ce97f5e (ci: bump VK-GL-CTS to 1.3.2.0)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16810>

2 years agoradv/ci: update the vkcts expectations for the CI machines
Martin Roukala (né Peres) [Wed, 1 Jun 2022 11:37:24 +0000 (14:37 +0300)]
radv/ci: update the vkcts expectations for the CI machines

Fixes: 836ce97f5e (ci: bump VK-GL-CTS to 1.3.2.0)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16810>

2 years agoradv/ci: bump the timeout of vangogh/renoir
Martin Roukala (né Peres) [Wed, 1 Jun 2022 11:43:03 +0000 (14:43 +0300)]
radv/ci: bump the timeout of vangogh/renoir

The execution time of vkcts has drastically changed with the latest
update, especially for APUs. This commit bumps the timeout to give
them a chance to finish.

Fixes: 836ce97f5e (ci: bump VK-GL-CTS to 1.3.2.0)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16810>

2 years agoradv: fix lowering GS intrinsics if NGG is disabled per pipeline
Samuel Pitoiset [Tue, 12 Apr 2022 10:38:24 +0000 (12:38 +0200)]
radv: fix lowering GS intrinsics if NGG is disabled per pipeline

If NGG is disabled per pipeline for extreme (or suboptimal) geometry
or with transform feedback, make sure to not lower GS intrinsics that
are only needed for NGG GS. This means we have to lower GS intrinsics
later in the compilation process to effectively know if the pipeline
uses NGG.

fossils-db (Navi21):
Totals from 8 (0.01% of 134913) affected shaders:
VGPRs: 512 -> 520 (+1.56%)
CodeSize: 58180 -> 65080 (+11.86%); split: -0.04%, +11.90%
MaxWaves: 128 -> 126 (-1.56%)
Instrs: 10525 -> 11779 (+11.91%); split: -0.05%, +11.96%
Latency: 62941 -> 49428 (-21.47%); split: -21.59%, +0.12%
InvThroughput: 16121 -> 12950 (-19.67%); split: -19.96%, +0.29%
VClause: 122 -> 123 (+0.82%); split: -0.82%, +1.64%
SClause: 130 -> 143 (+10.00%)
Copies: 566 -> 596 (+5.30%); split: -0.35%, +5.65%
Branches: 200 -> 208 (+4.00%)
PreSGPRs: 424 -> 422 (-0.47%)
PreVGPRs: 430 -> 424 (-1.40%); split: -1.63%, +0.23%

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15885>

2 years agodocs: update calendar and link releases notes for 22.0.5
Dylan Baker [Wed, 1 Jun 2022 23:55:26 +0000 (16:55 -0700)]
docs: update calendar and link releases notes for 22.0.5

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

2 years agodocs: update sha256 for 22.0.5
Dylan Baker [Wed, 1 Jun 2022 23:54:36 +0000 (16:54 -0700)]
docs: update sha256 for 22.0.5

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

2 years agodocs: add release notes for 22.0.5
Dylan Baker [Wed, 1 Jun 2022 21:52:05 +0000 (14:52 -0700)]
docs: add release notes for 22.0.5

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

2 years agodocs: update calendar and link releases notes for 22.1.1
Dylan Baker [Wed, 1 Jun 2022 23:55:17 +0000 (16:55 -0700)]
docs: update calendar and link releases notes for 22.1.1

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

2 years agodocs: Add sh256sums for 22.1.1
Dylan Baker [Wed, 1 Jun 2022 21:48:35 +0000 (14:48 -0700)]
docs: Add sh256sums for 22.1.1

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

2 years agodocs: add release notes for 22.1.1
Dylan Baker [Wed, 1 Jun 2022 21:09:10 +0000 (14:09 -0700)]
docs: add release notes for 22.1.1

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

2 years agowgl, d3d12: Handle front buffer writes for double-buffered MSAA surfaces backed by...
Jesse Natalie [Thu, 28 Apr 2022 20:53:58 +0000 (13:53 -0700)]
wgl, d3d12: Handle front buffer writes for double-buffered MSAA surfaces backed by swapchains

We don't need to go as far as the fake front thing when MSAA is being used, because the
swapchain (single-sampled) is already decoupled from the app render buffers. But we do
need to direct the frontbuffer flush to the single-sampled back buffer, and then present
the back buffer. We also need to swap the buffers when we do this, so the next blit
targets the former front buffer.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16227>

2 years agofreedreno/ir3: Fold 16-bit conversions into image load/store src/dsts.
Emma Anholt [Thu, 19 May 2022 20:41:34 +0000 (13:41 -0700)]
freedreno/ir3: Fold 16-bit conversions into image load/store src/dsts.

Shaves 5 instructions off of one manhattan31 shader.

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

2 years agofreedreno/ir3: Fix validation of half-precision image store values.
Emma Anholt [Tue, 31 May 2022 19:49:27 +0000 (12:49 -0700)]
freedreno/ir3: Fix validation of half-precision image store values.

ce1a381e57d2 ("turnip: enable VK_KHR_16bit_storage on A650") determined
that the type of the instr decided the type of the value being stored in
the ".b" case.  But it would be surprising if image stores had the type
determine the coordinates' precision instead of the value's, and once we
turned on image instruction precision lowering we ran into asserts.

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

2 years agofreedreno/ir3: Pass 16-bit sampler coordinates when possible.
Matt Turner [Mon, 22 Feb 2021 20:11:14 +0000 (20:11 +0000)]
freedreno/ir3: Pass 16-bit sampler coordinates when possible.

shader-db highlights from Rob's android shaders:

total instructions in shared programs: 769641 -> 767536 (-0.27%)
instructions in affected programs: 151139 -> 149034 (-1.39%)
total last-baryf in shared programs: 55908 -> 55607 (-0.54%)
last-baryf in affected programs: 35219 -> 34918 (-0.85%)
total sstall in shared programs: 67074 -> 65767 (-1.95%)
total full in shared programs: 36115 -> 36080 (-0.10%)
full in affected programs: 203 -> 168 (-17.24%)
sstall in affected programs: 9510 -> 8203 (-13.74%)
total (ss) in shared programs: 14380 -> 14239 (-0.98%)
(ss) in affected programs: 2965 -> 2824 (-4.76%)
total systall in shared programs: 92425 -> 91522 (-0.98%)
systall in affected programs: 13146 -> 12243 (-6.87%)
total (sy) in shared programs: 4330 -> 4314 (-0.37%)
(sy) in affected programs: 167 -> 151 (-9.58%)
total waves in shared programs: 71580 -> 71584 (<.01%)
waves in affected programs: 12 -> 16 (33.33%)

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

2 years agofreedreno/ir3: Make the types of tex coord padding match.
Emma Anholt [Tue, 31 May 2022 21:35:58 +0000 (14:35 -0700)]
freedreno/ir3: Make the types of tex coord padding match.

Required for lowering of coords to be 16-bit.

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

2 years agofreedreno/ir3: Move the texture array coord fixup to nir
Matt Turner [Fri, 19 Feb 2021 20:30:05 +0000 (20:30 +0000)]
freedreno/ir3: Move the texture array coord fixup to nir

We're going to optimize sampler coordinates to FP16, so we'll need to
add the appropriately typed 0.5. Move this to NIR where that information
is readily available.

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

2 years agofreedreno/ir3: Enable load/store vectorization for SSBO access, too.
Emma Anholt [Thu, 19 May 2022 19:40:18 +0000 (12:40 -0700)]
freedreno/ir3: Enable load/store vectorization for SSBO access, too.

Saves a few ldib/stib instructions in gfxbench vk-5-normal compute shaders
by grouping vec4 accesses together.

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

2 years agonir_lower_mediump: Drop assertion about not containing movs.
Emma Anholt [Thu, 19 May 2022 20:26:33 +0000 (13:26 -0700)]
nir_lower_mediump: Drop assertion about not containing movs.

A 1D texture operation may need to do a mov to turn a reference to a
channel of an SSA value into a scalar value to be passed as the texture
coordinate (since texture srcs can't do swizzles).  Seen in
amnesia-the-dark-descent/low/46.shader_test() for example, where a 1D
texture is used to remap each of r,g,b from a previous texture result.

Besides, the nir_op_is_vec() case will (perhaps surprisingly) look through
a mov, anyway.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16616>