platform/upstream/mesa.git
20 months agocso: inline more functions because some parameters like key_size are literals
Marek Olšák [Sun, 7 Aug 2022 23:29:37 +0000 (19:29 -0400)]
cso: inline more functions because some parameters like key_size are literals

One function is moved to the header file, the other two functions are inlined
manually.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

20 months agocso: don't destroy CSOs that are saved
Marek Olšák [Sat, 6 Aug 2022 21:30:02 +0000 (17:30 -0400)]
cso: don't destroy CSOs that are saved

I think this can't happen in practice, but better safe than sorry.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

20 months agocso: fix broken optimization for sampler state lookups
Marek Olšák [Sun, 7 Aug 2022 23:59:48 +0000 (19:59 -0400)]
cso: fix broken optimization for sampler state lookups

Since the key size wasn't a constant expression, all the function inlining
didn't do much. This makes it a constant expression.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: c4e18cd4dd1 - mesa/st: add PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_FREEDRENO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19129>

20 months agocso: constify some parameters to remove typecasts
Marek Olšák [Sat, 6 Aug 2022 21:28:34 +0000 (17:28 -0400)]
cso: constify some parameters to remove typecasts

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

20 months agocso: start without u_vbuf by default if it's not always used
Marek Olšák [Sat, 6 Aug 2022 21:28:59 +0000 (17:28 -0400)]
cso: start without u_vbuf by default if it's not always used

no functional change, but it's convenient for future work

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

20 months agoglthread: don't sync for glIsEnabled(GL_BLEND, GL_LIGHTING, GL_POLYGON_STIPPLE)
Marek Olšák [Sat, 27 Aug 2022 22:01:53 +0000 (18:01 -0400)]
glthread: don't sync for glIsEnabled(GL_BLEND, GL_LIGHTING, GL_POLYGON_STIPPLE)

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglthread remove the unused *last pointer from unmarshal functions
Marek Olšák [Tue, 27 Sep 2022 00:16:48 +0000 (20:16 -0400)]
glthread remove the unused *last pointer from unmarshal functions

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglthread: merge and collapse glBindBuffer calls that unbind and then bind
Marek Olšák [Mon, 22 Aug 2022 00:32:08 +0000 (20:32 -0400)]
glthread: merge and collapse glBindBuffer calls that unbind and then bind

This is a small optimization for viewperf. See the comment in the code.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: C style fixups
Marek Olšák [Mon, 29 Aug 2022 23:17:33 +0000 (19:17 -0400)]
gl_marshal.py: C style fixups

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogallium/u_threaded: don't call simplify_draw_info redundantly
Marek Olšák [Sat, 13 Aug 2022 14:04:22 +0000 (10:04 -0400)]
gallium/u_threaded: don't call simplify_draw_info redundantly

It's always called for the first and second draw in a row, and if they
can't be merged, the second draw becomes the first draw in the next call,
and simplify_draw_info is called again on that. Thus, it's called twice
on any draw that isn't merged. To prevent that, call it when we add
the draws.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglthread: rewrite CallList merging and do it in the app thread
Marek Olšák [Mon, 22 Aug 2022 03:49:14 +0000 (23:49 -0400)]
glthread: rewrite CallList merging and do it in the app thread

This looks simpler and hopefully faster, but it may just move the overhead
to the app thread.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglthread: demystify Draw function names
Marek Olšák [Sun, 21 Aug 2022 23:47:32 +0000 (19:47 -0400)]
glthread: demystify Draw function names

Since we had the freedom to write our own marshal and unmarshal Draw
functions, we turned it into a mess by doing whatever we want in those
functions. For example, DrawElementsInstancedBaseVertex actually
implemented DrawArraysInstancedBaseInstanceBaseInstance.

Add 4 internal GL functions that pass user buffers through marshal
/unmarshal functions, and clean up the other names to match their
behavior.

The new functions don't need any parameters in their definitions because
we don't call them directly.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglapi: remove EXT and ARB suffixes from Draw functions
Marek Olšák [Sun, 21 Aug 2022 22:27:08 +0000 (18:27 -0400)]
glapi: remove EXT and ARB suffixes from Draw functions

This swaps the function names with aliased names that don't have those
suffixes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglthread: add more DrawArrays/Elements variants with fewer fields
Marek Olšák [Sun, 21 Aug 2022 22:05:09 +0000 (18:05 -0400)]
glthread: add more DrawArrays/Elements variants with fewer fields

The idea is to save 8 bytes per call by removing 2 fields that are not
specified by the user such as instance_count=1, basevertex=0, and
baseinstance=0.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglthread: use a constant expression instead of cmd_size in custom functions
Marek Olšák [Sat, 13 Aug 2022 05:49:35 +0000 (01:49 -0400)]
glthread: use a constant expression instead of cmd_size in custom functions

cmd_size is constant in these cases

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: simplify print_sync_call and rename to print_call
Marek Olšák [Thu, 11 Aug 2022 15:59:26 +0000 (11:59 -0400)]
gl_marshal.py: simplify print_sync_call and rename to print_call

no spaces around = is a python convention for implicit arguments only

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: inline functions for readability
Marek Olšák [Thu, 11 Aug 2022 15:08:42 +0000 (11:08 -0400)]
gl_marshal.py: inline functions for readability

All functions have only one use. Jumping constantly between functions
in the file is confusing.

No spaces around = is a python convention for implicit arguments only.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: remove the -O1 hack and manual SET_* inlining
Marek Olšák [Thu, 11 Aug 2022 13:27:52 +0000 (09:27 -0400)]
gl_marshal.py: remove the -O1 hack and manual SET_* inlining

The compile times aren't so bad anymore now that the initialization is
split among all 8 files.

Also add one assertion.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: rework how the marshal dispatch table is initialized
Marek Olšák [Thu, 11 Aug 2022 13:10:15 +0000 (09:10 -0400)]
gl_marshal.py: rework how the marshal dispatch table is initialized

Instead of setting all function pointers in marshal_generated0.c,
set the function pointers in the file that contains the functions,
and remove all the forward declarations of marshal functions
in marshal_generated.h.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: move the unmarshal table into a separately generated file
Marek Olšák [Thu, 11 Aug 2022 12:43:54 +0000 (08:43 -0400)]
gl_marshal.py: move the unmarshal table into a separately generated file

It's unrelated to the rest of the script and it's in the way of bigger
changes.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agogl_marshal.py: remove/simplify parameters
Marek Olšák [Thu, 11 Aug 2022 11:49:58 +0000 (07:49 -0400)]
gl_marshal.py: remove/simplify parameters

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

20 months agoglsl: move lower instructions logic inside that pass
Timothy Arceri [Mon, 17 Oct 2022 10:49:44 +0000 (21:49 +1100)]
glsl: move lower instructions logic inside that pass

There is now only a single called of this pass so tidy things up
and move all this logic inside the pass.

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

20 months agoglsl: always do {CARRY,BORROW}_TO_ARITH lowering
Timothy Arceri [Mon, 17 Oct 2022 10:36:41 +0000 (21:36 +1100)]
glsl: always do {CARRY,BORROW}_TO_ARITH lowering

The only caller always sets these so here we just remove the
option to disable it.

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

20 months agoglsl: drop sub to add neg lowering in GLSL IR
Timothy Arceri [Mon, 17 Oct 2022 10:18:34 +0000 (21:18 +1100)]
glsl: drop sub to add neg lowering in GLSL IR

NIR opt algebraic does this for us so no need to have it
implemented here also.

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

20 months agoglsl: move rule inside lower_packing_builtins()
Timothy Arceri [Mon, 17 Oct 2022 04:28:26 +0000 (15:28 +1100)]
glsl: move rule inside lower_packing_builtins()

We only have a single user of this pass so lets tidy things up and
move all the rules in the pass itself.

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

20 months agoanv: work around improper buffer usage in hitman3
Mark Janes [Mon, 29 Aug 2022 23:25:30 +0000 (16:25 -0700)]
anv: work around improper buffer usage in hitman3

Avoid memory errors by returning an error immediately instead of
attempting to allocate the buffer view with an unsupported format.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6998

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17972>

20 months agoanv: add a layer for hitman3
Lionel Landwerlin [Tue, 23 Aug 2022 07:06:11 +0000 (10:06 +0300)]
anv: add a layer for hitman3

This title is trying to create a buffer view with usage not supported by Anv.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17972>

20 months agoanv: compile anv_acceleration_structure.c
Mark Janes [Tue, 18 Oct 2022 20:07:26 +0000 (13:07 -0700)]
anv: compile anv_acceleration_structure.c

This file was unintentionally excluded from meson build support.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17972>

20 months agoaco: add ACO_DEBUG=force-waitdeps
Rhys Perry [Thu, 25 Aug 2022 18:41:51 +0000 (19:41 +0100)]
aco: add ACO_DEBUG=force-waitdeps

GFX11 has a lot of complicated data dependency hazards.

For debugging GFX10+ data dependency hazards. This creates an excessive
amount of s_waitcnt_depctr.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco/gfx11: workaround VALUMaskWriteHazard
Rhys Perry [Tue, 27 Sep 2022 14:37:11 +0000 (15:37 +0100)]
aco/gfx11: workaround VALUMaskWriteHazard

fossil-db (gfx1100):
Totals from 62812 (46.52% of 135032) affected shaders:
Instrs: 43971580 -> 44069887 (+0.22%)
CodeSize: 233473420 -> 233866648 (+0.17%)
Latency: 463487489 -> 463520688 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 86505748 -> 86509679 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco/gfx11: workaround VALUPartialForwardingHazard
Rhys Perry [Thu, 25 Aug 2022 11:34:34 +0000 (12:34 +0100)]
aco/gfx11: workaround VALUPartialForwardingHazard

fossil-db (gfx1100):
Totals from 18121 (13.42% of 135032) affected shaders:
Instrs: 28272367 -> 28323468 (+0.18%)
CodeSize: 152581916 -> 152786320 (+0.13%)
Latency: 366477785 -> 366482318 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 74475188 -> 74475758 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco/gfx11: workaround VALUTransUseHazard
Rhys Perry [Thu, 13 Oct 2022 16:55:57 +0000 (17:55 +0100)]
aco/gfx11: workaround VALUTransUseHazard

fossil-db (gfx1100):
Totals from 116990 (86.64% of 135032) affected shaders:
Instrs: 67942325 -> 69493991 (+2.28%)
CodeSize: 366448984 -> 372655648 (+1.69%)
Latency: 673236871 -> 673269808 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 128266905 -> 128270175 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco/gfx11: workaround LdsDirectVMEMHazard
Rhys Perry [Thu, 25 Aug 2022 11:26:06 +0000 (12:26 +0100)]
aco/gfx11: workaround LdsDirectVMEMHazard

fossil-db (gfx1100):
Totals from 27217 (20.16% of 135032) affected shaders:
Instrs: 18010853 -> 18047277 (+0.20%)
CodeSize: 99369568 -> 99515264 (+0.15%)
Latency: 207454040 -> 207464932 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 39810158 -> 39810628 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco/gfx11: workaround LdsDirectVALUHazard
Rhys Perry [Thu, 25 Aug 2022 11:16:39 +0000 (12:16 +0100)]
aco/gfx11: workaround LdsDirectVALUHazard

fossil-db (gfx1100):
Totals from 57858 (42.85% of 135032) affected shaders:

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco/gfx11: workaround VcmpxPermlaneHazard
Rhys Perry [Thu, 14 Jul 2022 14:27:57 +0000 (15:27 +0100)]
aco/gfx11: workaround VcmpxPermlaneHazard

Same as GFX10, but in a separate pass because it's the only hazard that's
shared.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agoaco: add search_backwards helper
Rhys Perry [Thu, 25 Aug 2022 16:32:49 +0000 (17:32 +0100)]
aco: add search_backwards helper

This will be useful for VALUPartialForwardingHazard.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18273>

20 months agonir2dxil: Lower texture projections
Pedro J. Estébanez [Mon, 17 Oct 2022 11:34:05 +0000 (13:34 +0200)]
nir2dxil: Lower texture projections

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

20 months agomesa/st: remove translate_mode
Erik Faye-Lund [Tue, 11 Oct 2022 14:03:04 +0000 (16:03 +0200)]
mesa/st: remove translate_mode

This no longer does anything useful, so let's just drop it.

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

20 months agomesa/st: move static asserts out of translate_prim
Erik Faye-Lund [Tue, 11 Oct 2022 14:02:29 +0000 (16:02 +0200)]
mesa/st: move static asserts out of translate_prim

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

20 months agoCI: Add gallium-va and video-codecs in windows-vs2019 and debian-mingw32-x86_64
Sil Vilerino [Fri, 14 Oct 2022 14:36:58 +0000 (10:36 -0400)]
CI: Add gallium-va and video-codecs in windows-vs2019 and debian-mingw32-x86_64

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

20 months agod3d12: resource_from_handle to validate importing resource ptr from same d3d12 device
Sil Vilerino [Tue, 18 Oct 2022 13:05:24 +0000 (09:05 -0400)]
d3d12: resource_from_handle to validate importing resource ptr from same d3d12 device

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

20 months agofrontends/va: Add windows VA frontend support via vl_winsys_win32 and libva-win32
Sil Vilerino [Wed, 7 Sep 2022 17:42:04 +0000 (13:42 -0400)]
frontends/va: Add windows VA frontend support via vl_winsys_win32 and libva-win32

Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19063>

20 months agogallium/vl: Add vl_winsys_win32 support
Sil Vilerino [Wed, 7 Sep 2022 17:40:44 +0000 (13:40 -0400)]
gallium/vl: Add vl_winsys_win32 support

Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19063>

20 months agohasvk: use DX rules for point rasterization
Iván Briano [Wed, 5 Oct 2022 03:02:25 +0000 (20:02 -0700)]
hasvk: use DX rules for point rasterization

It seems that's what the reference renderer in the CTS expects for
Vulkan. This mostly matters if the edges of a point primitive fall
exactly on a pixel sampling point.

Fixes some upcoming tests under
dEQP-VK.pipeline.monolithic.depth.format.*.point_list*

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19026>

20 months agoanv: use DX rules for point rasterization
Iván Briano [Wed, 5 Oct 2022 03:02:25 +0000 (20:02 -0700)]
anv: use DX rules for point rasterization

It seems that's what the reference renderer in the CTS expects for
Vulkan. This mostly matters if the edges of a point primitive fall
exactly on a pixel sampling point.

Fixes some upcoming tests under
dEQP-VK.pipeline.monolithic.depth.format.*.point_list*

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19026>

20 months agoanv: compile_upload_rt_shader expects a valid pointer
Iván Briano [Tue, 18 Oct 2022 00:40:36 +0000 (17:40 -0700)]
anv: compile_upload_rt_shader expects a valid pointer

Fixes crashes on almost every CTS test that uses raytracing pipelines.

Fixes: ff91c5ca42b ("anv: add analysis for push descriptor uses and store it in shader cache")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19130>

20 months agoutil: Move the implementation of futex_wake and futex_wait from futex.h to futex.c
Yonggang Luo [Sat, 3 Sep 2022 08:58:05 +0000 (16:58 +0800)]
util: Move the implementation of futex_wake and futex_wait from futex.h to futex.c

Doing this is to avoid include bloat on Windows that pulls windows.h,
for other unix platforms, it's also benefit include the used symbols only when use
futex_wake and futex_wait.
No functional change, there is no performance incur because function call is consume
much less time than syscall

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19120>

20 months agofreedreno: Fix fence unref race
Rob Clark [Fri, 14 Oct 2022 18:32:01 +0000 (11:32 -0700)]
freedreno: Fix fence unref race

Destroying a fence that was never flushed could race with the submit
queue, which could cause either an fd leak or closing an fd that the
retire queue would want to use.

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

20 months agoradeonsi: fix max_dw computation for CS preambles
Marek Olšák [Mon, 10 Oct 2022 21:18:52 +0000 (17:18 -0400)]
radeonsi: fix max_dw computation for CS preambles

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

20 months agowinsys/amdgpu: fix (enable) preemption for chained IBs
Marek Olšák [Wed, 28 Sep 2022 10:24:49 +0000 (06:24 -0400)]
winsys/amdgpu: fix (enable) preemption for chained IBs

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

20 months agoradeonsi: rename si_create_multi_fence -> si_alloc_fence
Marek Olšák [Wed, 21 Sep 2022 20:14:32 +0000 (16:14 -0400)]
radeonsi: rename si_create_multi_fence -> si_alloc_fence

We no longer have any multi fences (gfx+sdma fence).

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

20 months agov3dv: drop error overwrite
Eric Engestrom [Fri, 30 Sep 2022 13:35:55 +0000 (14:35 +0100)]
v3dv: drop error overwrite

Let the error returned be bubbled up.

Fixes: dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
Fixes: 591103d04d5f18ae30c7 ("v3dv: don't return incompatible driver if GPU is not present")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18901>

20 months agoasahi: Lower point sprites in driver
Alyssa Rosenzweig [Tue, 18 Oct 2022 17:45:36 +0000 (13:45 -0400)]
asahi: Lower point sprites in driver

mesa/st can't save us now!

Fixes: 310959d9fe1 ("mesa/st: rip out point-sprite cap")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18651>

20 months agou_transfer_helper: Handle Z24S8 with z24_in_z32f but no interleaving
Alyssa Rosenzweig [Sun, 18 Sep 2022 14:54:29 +0000 (10:54 -0400)]
u_transfer_helper: Handle Z24S8 with z24_in_z32f but no interleaving

First, the separate Z/S condition kicks in, splitting up Z24S8 into
Z24X8 + S8. But then the driver is asked to create a Z24X8 resource,
which it may not be able to do. We need to further lower at create
time to Z32F + S8, so the driver is only asked to create supported
formats. We can do this with an extra condition at create time.

The alternate approach would be recursing into
transfer_helper_resource_create, but this seemed more obvious.

Fixes assertion failure running neverball on Asahi.

Assertion failed: (templ->format != PIPE_FORMAT_Z24X8_UNORM &&
      templ->format != PIPE_FORMAT_Z24_UNORM_S8_UINT &&
      "u_transfer_helper should have lowered"), function
agx_resource_create, file agx_pipe.c, line 174.

Fixes: 45a37ace287 ("u_transfer_helper: Handle Z24X8 for drivers that don't use the interleaved transfer_map")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18651>

20 months agonir/lower_io: Set interpolated_input dest_type
Alyssa Rosenzweig [Sat, 15 Oct 2022 01:27:21 +0000 (21:27 -0400)]
nir/lower_io: Set interpolated_input dest_type

...even for non-pixel interpolation, for consistency. Otherwise backends get
funny intrinsics with interpolateAt:

   vec4 32 ssa_4 = intrinsic load_interpolated_input (ssa_3, ssa_2) (base=1, component=0, dest_type=invalid /*0*/, io location=33 slots=1 /*161*/)

We know it'll be a float, but backends shouldn't need to special case this. (Or
maybe interpolated_input shouldn't have a dest_type index. I'd be ok with that
resolution too. But having one and not setting it consistently is wrong.)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19085>

20 months agomesa: Fix multiple matrix pops in a row
Alyssa Rosenzweig [Sat, 15 Oct 2022 18:42:49 +0000 (14:42 -0400)]
mesa: Fix multiple matrix pops in a row

When we pop a matrix, we update stack->Top, which means that stack->Top has
changed since last push. We cannot skip subsequent pops or we'll get an
incorrect matrix.

Fixes Neverball rendering. When collecting a coin in game, the
point-sprite stars popping out of the coin are in the wrong places
due to an incorrect transformation matrix.

Close: #7502
Fixes: e6ecd22140f ("mesa: make glPopMatrix a no-op if the matrix hasn't changed")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19090>

21 months agotu: Optimize hash_renderpass_instance by removing XXH64_update
Mark Collins [Tue, 6 Sep 2022 05:55:04 +0000 (05:55 +0000)]
tu: Optimize hash_renderpass_instance by removing XXH64_update

It was determined through testing that `XXH64_update` is
significantly slower than calling `XXH64` directly as far as small
data velocity is concerned. This function is called on every RP end
which made it visible while profiling but substantial difference
(measured to be ~4x) made it not show up whatsoever.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18428>

21 months agoanv: fill AlphaToCoverageEnable lazily from state
Tapani Pälli [Mon, 17 Oct 2022 07:54:03 +0000 (10:54 +0300)]
anv: fill AlphaToCoverageEnable lazily from state

Now the first blend state is filled only when emitted.

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

21 months agoanv: move emit_shading_rate to gfx8_cmd_buffer
Tapani Pälli [Mon, 17 Oct 2022 07:47:43 +0000 (10:47 +0300)]
anv: move emit_shading_rate to gfx8_cmd_buffer

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

21 months agod3d10ump: No need define snprintf anymore in InputAssembly.cpp
Yonggang Luo [Mon, 19 Sep 2022 19:34:25 +0000 (03:34 +0800)]
d3d10ump: No need define snprintf anymore in InputAssembly.cpp

As minimal visual studio version are 2019

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

21 months agonir: No need redefine snprintf anymore in nir.h
Yonggang Luo [Mon, 19 Sep 2022 19:33:44 +0000 (03:33 +0800)]
nir: No need redefine snprintf anymore in nir.h

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

21 months agogallium: delete graw
Yonggang Luo [Sun, 16 Oct 2022 19:58:49 +0000 (03:58 +0800)]
gallium: delete graw

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

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19099>

21 months agoglsl/glsl_to_nir: remove unreachable code
Timothy Arceri [Mon, 17 Oct 2022 02:28:19 +0000 (13:28 +1100)]
glsl/glsl_to_nir: remove unreachable code

This hack in glsl_to_nir() to clean up after the glsl ir linker should
no longer be reachable. These type of linking opts are now done via
a nir based linker long after GLSL IR has been coverted to nir by
this pass.

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

21 months agoradv: fix setting results for initialization failures in thread trace and trap handler
Sergei Chernyadyev [Mon, 17 Oct 2022 17:29:39 +0000 (20:29 +0300)]
radv: fix setting results for initialization failures in thread trace and trap handler

Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19083>

21 months agoradeonsi: Inherit the old modifier when reallocating the texture.
nyanmisaka [Mon, 17 Oct 2022 14:51:37 +0000 (22:51 +0800)]
radeonsi: Inherit the old modifier when reallocating the texture.

Otherwise the reallocated texture has an invalid modifier when exporting
the VAAPI surface handle.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19097>

21 months agoanv: fix FTBFS on grl due to changes in clang 15
Luis Felipe Strano Moraes [Sun, 16 Oct 2022 20:50:24 +0000 (13:50 -0700)]
anv: fix FTBFS on grl due to changes in clang 15

This was causing build failures when RT is enabled on recent Fedora releases.

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

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19094>

21 months agonir: Usher nir_normalize_cubemap_coords into 2022
Alyssa Rosenzweig [Thu, 22 Sep 2022 14:22:03 +0000 (10:22 -0400)]
nir: Usher nir_normalize_cubemap_coords into 2022

I stumbled upon this old NIR pass (still in use by intel and broadcom)
and noticed how most of the code was NIR boilerplate that we have
helpers for. Rewrite the pass to use all the helpers.

v2: Fix cube map arrays.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18754>

21 months agonir: Fix nir_fmax_abs_vec_comp
Alyssa Rosenzweig [Thu, 13 Oct 2022 21:18:09 +0000 (17:18 -0400)]
nir: Fix nir_fmax_abs_vec_comp

This failed to take fabs of the first component, implementing an unintended
formula that would return the right results in some common cases but is wrong in
general:

   max { x, |y|, |z| }

instead of the intended

   max { |x|, |y|, |z| }

Reexpress the implementation to make correctness obvious.

Fixes: 272e927d0e9 ("nir/spirv: initial handling of OpenCL.std extension opcodes")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18754>

21 months agod3d12: HEVC Set D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_USE_ASYMETRIC_MOTIO...
Sil Vilerino [Mon, 17 Oct 2022 12:27:28 +0000 (08:27 -0400)]
d3d12: HEVC Set D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_USE_ASYMETRIC_MOTION_PARTITION when required by caps

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

21 months agod3d12: Fix HEVC wrong caps detection due to bad parenthesis in condition
Sil Vilerino [Mon, 17 Oct 2022 12:15:51 +0000 (08:15 -0400)]
d3d12: Fix HEVC wrong caps detection due to bad parenthesis in condition

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

21 months agod3d12: HEVC Encode workaround for edge case in caps reporting not contemplated by...
Sil Vilerino [Fri, 14 Oct 2022 12:22:52 +0000 (08:22 -0400)]
d3d12: HEVC Encode workaround for edge case in caps reporting not contemplated by upper layer interface

Workaround for https://github.com/intel/libva/issues/641

Example where VAConfigAttribValEncHEVCBlockSizes.max_transform_hierarchy_depth_intra/inter overflows

MinCbLog2SizeY = log2(8) = 3
CtbLog2SizeY = log2(64) = 6
MinTbLog2SizeY = log2(4) = 2
MaxTbLog2SizeY = log2(32) = 5

max_transform_hierarchy_depth_intra = (CtbLog2SizeY − MinTbLog2SizeY) = 4
max_transform_hierarchy_depth_inter = (CtbLog2SizeY − MinTbLog2SizeY) = 4

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

21 months agotu: Fix the size of patch control points state
Danylo Piliaiev [Fri, 14 Oct 2022 14:00:17 +0000 (16:00 +0200)]
tu: Fix the size of patch control points state

tu6_emit_patch_control_points was called with CS size calculated
at compile time, but HS params have dynamic size. Account for this.

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

Fixes: 68f3c38c8011e3ff304a67b6ffb33fd21ee65b0c
("tu: Implement extendedDynamicState2PatchControlPoints")

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

21 months agoaco/spill: Fix spilling of Phi operands
Daniel Schürmann [Mon, 17 Oct 2022 09:40:40 +0000 (11:40 +0200)]
aco/spill: Fix spilling of Phi operands

By adding the renamed variable, phi operands got spilled twice at the precessors.

Fixes: dEQP-VK.ray_query.misc.dynamic_indexing
Closes: #7493
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19109>

21 months agopan/mdg: Fix 16-bit alignment with spiller
Alyssa Rosenzweig [Sun, 16 Oct 2022 01:32:11 +0000 (21:32 -0400)]
pan/mdg: Fix 16-bit alignment with spiller

The loop over sources has to happen for every instruction, regardless of whether
we also need to register allocate the destination. The other source loops handle
this properly, but this one was missed.

Fixes spilling failure in shaders/android/angle/aztec_ruins/16.shader_test when
the input NIR is shuffled a bit (from reordering passes).

Fixes: 129d390bd8c ("pan/mdg: Fix bound setting in RA for sources")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19093>

21 months agopan/mdg: Limit work registers for large workgroups
Alyssa Rosenzweig [Sat, 15 Oct 2022 23:01:47 +0000 (19:01 -0400)]
pan/mdg: Limit work registers for large workgroups

When more than 8 registers are used, Midgard can only fit 64 threads in a
thread group. For barriers to work properly, a threadgroup must fit an entire
work group. The GL driver configures the hardware to have threadgroups the size
of work groups. That means if more than 64 threads are used in a workgroup, and
more than 8 registers are used, the hardware will fault spawning threads.

To workaround this hardware limitation, we need to limit the number of work
registers used depending on the size of the workgroup. Typically, the work group
size is known at compile-time so that determination can usually be made without
variants. To avoid variants, we make a pessimistic estimate in the case when
it's not known at compile-time.

shader-db shows 6 shaders affected. I expect that all of these would fault with
DATA_INVALID_FAULT if they tried to execute before this patch, due to the
oversize local size, and faulting is even slower than spilling ;-)

Fixes dEQP-GLES31.functional.synchronization.* on Mali-T860.

instructions HURT:   shaders/android/gfxbench/carchase/6.shader_test MESA_SHADER_COMPUTE: 121 -> 157 (29.75%)
instructions HURT:   shaders/android/gfxbench/carchase/386.shader_test MESA_SHADER_COMPUTE: 121 -> 157 (29.75%)
instructions HURT:   shaders/android/gfxbench/carchase/374.shader_test MESA_SHADER_COMPUTE: 141 -> 184 (30.50%)
instructions HURT:   shaders/android/gfxbench/carchase/4-1.shader_test MESA_SHADER_COMPUTE: 141 -> 184 (30.50%)
instructions HURT:   shaders/android/com.miHoYo.GenshinImpact/18.shader_test MESA_SHADER_COMPUTE: 513 -> 933 (81.87%)
instructions HURT:   shaders/android/com.miHoYo.GenshinImpact/16.shader_test MESA_SHADER_COMPUTE: 505 -> 1002 (98.42%)

bundles HURT:   shaders/android/gfxbench/carchase/374.shader_test MESA_SHADER_COMPUTE: 73 -> 116 (58.90%)
bundles HURT:   shaders/android/gfxbench/carchase/4-1.shader_test MESA_SHADER_COMPUTE: 73 -> 116 (58.90%)
bundles HURT:   shaders/android/gfxbench/carchase/6.shader_test MESA_SHADER_COMPUTE: 61 -> 97 (59.02%)
bundles HURT:   shaders/android/gfxbench/carchase/386.shader_test MESA_SHADER_COMPUTE: 61 -> 97 (59.02%)
bundles HURT:   shaders/android/com.miHoYo.GenshinImpact/18.shader_test MESA_SHADER_COMPUTE: 281 -> 701 (149.47%)
bundles HURT:   shaders/android/com.miHoYo.GenshinImpact/16.shader_test MESA_SHADER_COMPUTE: 278 -> 775 (178.78%)

registers helped:   shaders/android/gfxbench/carchase/374.shader_test MESA_SHADER_COMPUTE: 11 -> 8 (-27.27%)
registers helped:   shaders/android/gfxbench/carchase/4-1.shader_test MESA_SHADER_COMPUTE: 11 -> 8 (-27.27%)
registers helped:   shaders/android/gfxbench/carchase/6.shader_test MESA_SHADER_COMPUTE: 14 -> 8 (-42.86%)
registers helped:   shaders/android/gfxbench/carchase/386.shader_test MESA_SHADER_COMPUTE: 14 -> 8 (-42.86%)
registers helped:   shaders/android/com.miHoYo.GenshinImpact/16.shader_test MESA_SHADER_COMPUTE: 16 -> 8 (-50.00%)
registers helped:   shaders/android/com.miHoYo.GenshinImpact/18.shader_test MESA_SHADER_COMPUTE: 16 -> 8 (-50.00%)

threads helped:   shaders/android/gfxbench/carchase/6.shader_test MESA_SHADER_COMPUTE: 1 -> 2 (100.00%)
threads helped:   shaders/android/gfxbench/carchase/386.shader_test MESA_SHADER_COMPUTE: 1 -> 2 (100.00%)
threads helped:   shaders/android/gfxbench/carchase/374.shader_test MESA_SHADER_COMPUTE: 1 -> 2 (100.00%)
threads helped:   shaders/android/gfxbench/carchase/4-1.shader_test MESA_SHADER_COMPUTE: 1 -> 2 (100.00%)
threads helped:   shaders/android/com.miHoYo.GenshinImpact/16.shader_test MESA_SHADER_COMPUTE: 1 -> 2 (100.00%)
threads helped:   shaders/android/com.miHoYo.GenshinImpact/18.shader_test MESA_SHADER_COMPUTE: 1 -> 2 (100.00%)

spills HURT:   shaders/android/gfxbench/carchase/374.shader_test MESA_SHADER_COMPUTE: 0 -> 5
spills HURT:   shaders/android/gfxbench/carchase/4-1.shader_test MESA_SHADER_COMPUTE: 0 -> 5
spills HURT:   shaders/android/gfxbench/carchase/6.shader_test MESA_SHADER_COMPUTE: 0 -> 8
spills HURT:   shaders/android/gfxbench/carchase/386.shader_test MESA_SHADER_COMPUTE: 0 -> 8
spills HURT:   shaders/android/com.miHoYo.GenshinImpact/18.shader_test MESA_SHADER_COMPUTE: 0 -> 112
spills HURT:   shaders/android/com.miHoYo.GenshinImpact/16.shader_test MESA_SHADER_COMPUTE: 0 -> 146

fills HURT:   shaders/android/gfxbench/carchase/6.shader_test MESA_SHADER_COMPUTE: 0 -> 26
fills HURT:   shaders/android/gfxbench/carchase/386.shader_test MESA_SHADER_COMPUTE: 0 -> 26
fills HURT:   shaders/android/gfxbench/carchase/374.shader_test MESA_SHADER_COMPUTE: 0 -> 33
fills HURT:   shaders/android/gfxbench/carchase/4-1.shader_test MESA_SHADER_COMPUTE: 0 -> 33
fills HURT:   shaders/android/com.miHoYo.GenshinImpact/18.shader_test MESA_SHADER_COMPUTE: 0 -> 209
fills HURT:   shaders/android/com.miHoYo.GenshinImpact/16.shader_test MESA_SHADER_COMPUTE: 0 -> 234

total instructions in shared programs: 1521691 -> 1522766 (0.07%)
instructions in affected programs: 1542 -> 2617 (69.71%)
helped: 0
HURT: 6
HURT stats (abs)   min: 36.0 max: 497.0 x̄: 179.17 x̃: 43
HURT stats (rel)   min: 29.75% max: 98.42% x̄: 50.13% x̃: 30.50%
95% mean confidence interval for instructions value: -49.36 407.69
95% mean confidence interval for instructions %-change: 17.14% 83.12%
Inconclusive result (value mean confidence interval includes 0).

total bundles in shared programs: 649296 -> 650371 (0.17%)
bundles in affected programs: 827 -> 1902 (129.99%)
helped: 0
HURT: 6
HURT stats (abs)   min: 36.0 max: 497.0 x̄: 179.17 x̃: 43
HURT stats (rel)   min: 58.90% max: 178.78% x̄: 94.01% x̃: 59.02%
95% mean confidence interval for bundles value: -49.36 407.69
95% mean confidence interval for bundles %-change: 36.20% 151.83%
Inconclusive result (value mean confidence interval includes 0).

total registers in shared programs: 90681 -> 90647 (-0.04%)
registers in affected programs: 82 -> 48 (-41.46%)
helped: 6
HURT: 0
helped stats (abs) min: 3.0 max: 8.0 x̄: 5.67 x̃: 6
helped stats (rel) min: 27.27% max: 50.00% x̄: 40.04% x̃: 42.86%
95% mean confidence interval for registers value: -8.03 -3.30
95% mean confidence interval for registers %-change: -50.95% -29.13%
Registers are helped.

total threads in shared programs: 55717 -> 55723 (0.01%)
threads in affected programs: 6 -> 12 (100.00%)
helped: 6
HURT: 0
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
95% mean confidence interval for threads value: 1.00 1.00
95% mean confidence interval for threads %-change: 100.00% 100.00%
Threads are helped.

total spills in shared programs: 1108 -> 1392 (25.63%)
spills in affected programs: 0 -> 284
helped: 0
HURT: 6

total fills in shared programs: 4721 -> 5282 (11.88%)
fills in affected programs: 0 -> 561
helped: 0
HURT: 6

Cc: mesa-stable
Closes: #7228
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19092>

21 months agopan/mdg: Lower PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK on Midgard
Alyssa Rosenzweig [Sat, 15 Oct 2022 22:59:15 +0000 (18:59 -0400)]
pan/mdg: Lower PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK on Midgard

The register file on Midgard is not large enough to sustain 256 threads in a
threadgroup when all ISA-defined registers are used. As such, we want
to advertise the smallest MAX_THREADS_PER_BLOCK permissible by the spec to
avoid compiling shaders that will necessarily spill. The minimum-maximum in
OpenGL ES 3.1 is 128, so set that on Midgard.

6 compute shaders LOST in shader-db due to exceeding this new limit. These
shaders would fault if they were attempted to be executed.

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

21 months agopanfrost/ci: Remove stale fail
Alyssa Rosenzweig [Sat, 15 Oct 2022 20:30:25 +0000 (16:30 -0400)]
panfrost/ci: Remove stale fail

Due to fractional run. This whole section passes.

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

21 months agoanv: Enable 16 bit float ops on devices that have a LSC
Rohan Garg [Mon, 17 Oct 2022 13:54:06 +0000 (15:54 +0200)]
anv: Enable 16 bit float ops on devices that have a LSC

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17988>

21 months agointel/compiler: Support 16 bit float ops
Rohan Garg [Mon, 17 Oct 2022 13:53:50 +0000 (15:53 +0200)]
intel/compiler: Support 16 bit float ops

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17988>

21 months agoRevert "panfrost/ci: Disable t720 jobs"
Daniel Stone [Mon, 17 Oct 2022 11:13:47 +0000 (12:13 +0100)]
Revert "panfrost/ci: Disable t720 jobs"

This reverts commit b3a69d1c31a0c4073e7865945b9f70f96be6c34e.

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

21 months agov3dv/pipeline: keep qpu_insts around if we expect them to be used later
Alejandro Piñeiro [Fri, 30 Sep 2022 11:32:41 +0000 (13:32 +0200)]
v3dv/pipeline: keep qpu_insts around if we expect them to be used later

If the pipeline was created with the creation flags
VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR or
VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR it is
really likely that methods from VK_KHR_pipeline_executable_properties
that would require having access to the qpu insts around will be
called.

Instead of getting those back from the BO where we upload them, we
just keep them around. This could require more host memory, but would
allow us to avoid needing to handle map/unmap the BO when needed (so
needing the host memory in any case). This can be tricky if those
methods are being called from different threads (so we can avoid
adding a mutex there).

In the same way, if the pipeline was not created with those flags, we
skip collecting data that requires the QPU. Only
GetPipelineExecutableProperties is allowed to be called without any of
those flags, and doesn't require that info.

This fixes a race condition crash at GetPipelineExecutableProperties
when using fossilize-replay with some fossils with several shaders,
and using several threads, as some thread would be unmapping the bo
before other thread stopped to use it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18859>

21 months agoglthread: leave dlist dispatch in place for Begin/End
Timothy Arceri [Sat, 15 Oct 2022 10:33:14 +0000 (21:33 +1100)]
glthread: leave dlist dispatch in place for Begin/End

If Begin/End are called from a display list make sure to leave
the dlist.c's dispatch table in place just like the non-glthread
code does.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7335
Fixes: 7f1cac7ba682 ("mesa/glthread: enable immediate mode")

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

21 months agoradv: discard the PS epilog when the pipeline doesn't use a fragment shader
Samuel Pitoiset [Mon, 10 Oct 2022 13:53:43 +0000 (15:53 +0200)]
radv: discard the PS epilog when the pipeline doesn't use a fragment shader

This makes no sense and this was broken.

Fixes dEQP-VK.mesh_shader.ext.smoke.*_lib.mesh_shader_triangle_rasterization_disabled.

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

21 months agoradv: do not create a noop FS when the FS is imported from a library
Samuel Pitoiset [Mon, 10 Oct 2022 14:11:50 +0000 (16:11 +0200)]
radv: do not create a noop FS when the FS is imported from a library

The entrypoint can be NULL even if the FS is imported from a library,
but we shouldn't overwrite the pre-compiled FS by a noop.

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

21 months agoRevert "CI: Igalia farm is down"
Jose Maria Casanova Crespo [Mon, 17 Oct 2022 00:02:01 +0000 (02:02 +0200)]
Revert "CI: Igalia farm is down"

This reverts commit aa405b789ebf1797fdb3a1891fac49d0cca21c42.

Igalia farm is up again. Switch died and it needed to be replaced.

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

21 months agomesa: add EXT_debug_label support
Timothy Arceri [Wed, 5 Oct 2022 23:44:39 +0000 (10:44 +1100)]
mesa: add EXT_debug_label support

KHR_debug provides the same functionality but this extension is
still in use and adding support for it seems fairly harmless.

For example its used by Unity and without it we keep
getting given apitraces from Unity games that just spew out
unsupported function errors due to the missing support.

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

21 months agoci/windows: Getting the default supported windows version to be 7 when using mingw
Yonggang Luo [Sun, 16 Oct 2022 16:05:08 +0000 (00:05 +0800)]
ci/windows: Getting the default supported windows version to be 7 when using mingw

MSVC are already tested with default windows version 8

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

21 months agoci/windows: Remove -Dlibelf:warning_level=1 as libelf subproject are already removed
Yonggang Luo [Sun, 16 Oct 2022 16:02:40 +0000 (00:02 +0800)]
ci/windows: Remove -Dlibelf:warning_level=1 as libelf subproject are already removed

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

21 months agoci/windows: Enable gles1 for msvc
Yonggang Luo [Sat, 15 Oct 2022 07:30:39 +0000 (15:30 +0800)]
ci/windows: Enable gles1 for msvc

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

21 months agoradv/rra: Use the accel struct type for header validation
Konstantin Seurer [Sat, 15 Oct 2022 10:02:05 +0000 (12:02 +0200)]
radv/rra: Use the accel struct type for header validation

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19089>

21 months agoradv/rra: Continue dumping accel structs if validation fails
Konstantin Seurer [Sat, 15 Oct 2022 09:53:21 +0000 (11:53 +0200)]
radv/rra: Continue dumping accel structs if validation fails

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19089>

21 months agoradv/rra: Add basic header validation
Konstantin Seurer [Sat, 15 Oct 2022 09:52:41 +0000 (11:52 +0200)]
radv/rra: Add basic header validation

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19089>

21 months agoradv/rra: Validate before gathering bvh info
Konstantin Seurer [Sat, 15 Oct 2022 08:59:20 +0000 (10:59 +0200)]
radv/rra: Validate before gathering bvh info

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19089>

21 months agoradv/rra: Fix dumps in the case of aliasing
Konstantin Seurer [Fri, 14 Oct 2022 16:50:30 +0000 (18:50 +0200)]
radv/rra: Fix dumps in the case of aliasing

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19089>

21 months agoCI: Igalia farm is down
Jose Maria Casanova Crespo [Sun, 16 Oct 2022 10:05:02 +0000 (12:05 +0200)]
CI: Igalia farm is down

It seems a power outage affected the Raspberry Pi farm nodes.

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

21 months agoutil: Turn -DWINDOWS_NO_FUTEX to be pre_args
Yonggang Luo [Sat, 15 Oct 2022 10:50:09 +0000 (18:50 +0800)]
util: Turn -DWINDOWS_NO_FUTEX to be pre_args

Turn -DWINDOWS_NO_FUTEX to be pre_args for not need add direct dependencies
to dep_futex for libraries and executables.
So only add dependencies to idep_mesautil is enough.

And this will make sure all source code are either using Windows futex,
or use mtx_t consistently across different sources, other than mixed usage of
futex and mtx_t before this commit.

If -DWINDOWS_NO_FUTEX is not globally available, that would cause
/src/util/simple_mtx.h:116: undefined reference to `futex_wait'

This error is raised when
 * compiled with -D min-windows-version=7
 * moved futex_wait from futex.h to futex.c
 * used simple_mtx_t in more codes

Or linkage error:
src/compiler/libcompiler.a.p/glsl_types.cpp.obj: in function `futex_wake':
/../../src/util/futex.h:154: undefined reference to `WaitOnAddress'
When:
 * compiled with -D min-windows-version=7
 * used simple_mtx_t in more codes

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7494
Fixes: c002bbeb2f7 ("util: Add a Win32 futex impl")

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

21 months agomesa,gallium: Revert "Make point coord origin a CAP"
Alyssa Rosenzweig [Fri, 14 Oct 2022 17:45:48 +0000 (13:45 -0400)]
mesa,gallium: Revert "Make point coord origin a CAP"

This reverts commit e749f67f8989874f6795d95422c1f3eb4d2706ba, which added a CAP
to support drivers that can only do upside-down point coordinates. That was
added specifically for Asahi, since Metal's point coordinate convention is
opposite Mesa's. Since then, additional reverse-engineering aided by the PowerVR
headers led me to the bit doing the flip in hardware, so Asahi does not use the
CAP since baadc1ec13f ("asahi: Don't use lower_wpos_pntc"). Garbage collect it.

[If it's needed for future hardware, we can revive it. But the plan is Vulkan
anyway.]

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19078>

21 months agointel: Add and use intel_engines_class_to_string()
José Roberto de Souza [Wed, 5 Oct 2022 20:27:08 +0000 (13:27 -0700)]
intel: Add and use intel_engines_class_to_string()

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18975>

21 months agointel: Convert i915 engine type to intel in tools/ common/ and ds/
José Roberto de Souza [Wed, 5 Oct 2022 19:52:05 +0000 (12:52 -0700)]
intel: Convert i915 engine type to intel in tools/ common/ and ds/

This ones were left to be done after initial conversion.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18975>

21 months agointel: Convert missing i915 engine types to intel
José Roberto de Souza [Wed, 5 Oct 2022 19:46:31 +0000 (12:46 -0700)]
intel: Convert missing i915 engine types to intel

This convertions were missed due to bad rebased in my end, sorry.

Fixes: 03b959286e2c ("intel: Make engine related functions and types not i915 dependent")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18975>