platform/upstream/mesa.git
2 years agoradv: Do not discard hits with t=tmax
Konstantin Seurer [Tue, 19 Apr 2022 14:13:28 +0000 (16:13 +0200)]
radv: Do not discard hits with t=tmax

Fixes dEQP-VK.ray_tracing_pipeline.inside_aabbs.chit.ray_end_tmax_zero.*

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16034>

2 years agoanv: implement VK_EXT_primitives_generated_query
Lionel Landwerlin [Wed, 26 Jan 2022 10:43:51 +0000 (12:43 +0200)]
anv: implement VK_EXT_primitives_generated_query

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15638>

2 years agotgsi: Emit ureg HW_ATOMIC decls in range order.
Emma Anholt [Wed, 29 Dec 2021 22:55:24 +0000 (14:55 -0800)]
tgsi: Emit ureg HW_ATOMIC decls in range order.

It turns out r600 has a dependency on it.

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

2 years agonir_to_tgsi: Allocate the primid sysval to num_inputs, not num_outputs.
Emma Anholt [Mon, 14 Feb 2022 04:33:13 +0000 (20:33 -0800)]
nir_to_tgsi: Allocate the primid sysval to num_inputs, not num_outputs.

r600 would end up looking for it past the end of its array of inputs
(which expected 1:1 ordering from declarations to driver locations).

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

2 years agonir_to_tgsi: Avoid swizzling from undefined channels in load_output.
Emma Anholt [Tue, 5 Apr 2022 03:32:47 +0000 (20:32 -0700)]
nir_to_tgsi: Avoid swizzling from undefined channels in load_output.

virglrenderer emits GLSL referencing all the swizzles, even if the write
mask doesn't contain them.  This is a problem when the output is
TessLevelInner, which has only 2 elements.

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

2 years agonir_to_tgsi: Don't forget to split 64-bit store_per_vertex_output.
Emma Anholt [Wed, 30 Mar 2022 23:08:37 +0000 (16:08 -0700)]
nir_to_tgsi: Don't forget to split 64-bit store_per_vertex_output.

Same splitting method as store_output.  Fixes regressions in virgl
with nir-to-tgsi.

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

2 years agonir_to_tgsi: Fix assertion failures handling 64-bit vec3/vec4 ssa undefs.
Emma Anholt [Wed, 30 Mar 2022 22:57:34 +0000 (15:57 -0700)]
nir_to_tgsi: Fix assertion failures handling 64-bit vec3/vec4 ssa undefs.

Found in virgl, where a glslparsertest accidentally gets its inputs
lowered to undefs, and 64-bit undefs don't get split by the normal
alu/intrinsic splitter (and would be hard to split because other passes
would see reconstruction of the vec4 from undefs and turn it back into
vec3/vec4 undef).

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>

2 years agonir_to_tgsi: Add a workaround for virglrenderer TG4.
Emma Anholt [Mon, 14 Feb 2022 19:57:37 +0000 (11:57 -0800)]
nir_to_tgsi: Add a workaround for virglrenderer TG4.

I've tried to keep virglrenderer workarounds out of ntt, but this one
would be bothersome to do with tgsi_translate and TG4 is pretty low-stakes
for NTT consumers.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>

2 years agowin32: Do not use BUILD_GL32, we use def file to export win32 dll symbols.
Yonggang Luo [Sat, 4 Dec 2021 07:44:51 +0000 (15:44 +0800)]
win32: Do not use BUILD_GL32, we use def file to export win32 dll symbols.

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

2 years agowin32: Fixes 32 bits visual studio module definition files by add script gen_vs_modul...
Yonggang Luo [Fri, 3 Dec 2021 12:51:58 +0000 (20:51 +0800)]
win32: Fixes 32 bits visual studio module definition files by add script gen_vs_module_defs.py

Getting opengl32*.def consistence with Windows SDK.
Getting osmesa.mingw.def's gl* functions consistence with Windows SDK.
stw_* functions are cdecl, not stdcall, so there is no need mangling the symbol.
Fixes egl.def for x86
d3d10sw: Move the place of d3d10_sw.def to d3d10_sw.def.in
Fixes vulkan_lvp.def for x86
Fixes #5552
Remove stdcall-fixup

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

2 years agoturnip: Don't disable LRZ in subpasses after the first in the easy case.
Emma Anholt [Mon, 18 Apr 2022 17:41:01 +0000 (10:41 -0700)]
turnip: Don't disable LRZ in subpasses after the first in the easy case.

If it's the same depth/stencil attachment, then there's no need to turn
off LRZ just because the subpass changed.  Doesn't help gfxbench perf yet,
but will with !16014.

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

2 years agoturnip: Ignore TOP/BOTTOM_OF_PIPE bits in subpass src/dst dep flags.
Emma Anholt [Mon, 18 Apr 2022 18:16:07 +0000 (11:16 -0700)]
turnip: Ignore TOP/BOTTOM_OF_PIPE bits in subpass src/dst dep flags.

gfxbench sets these between the gbuffer subpass and the following ones.
They should be no-ops as subpass dependencies.  gfxbench vk-5-debug perf
12.8 -> 14.6 fps thanks to getting gmem on the gbuffer rendering.

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

2 years agofreedreno/ir3: Call nir_opt_find_array_copies().
Emma Anholt [Fri, 15 Apr 2022 19:08:07 +0000 (12:08 -0700)]
freedreno/ir3: Call nir_opt_find_array_copies().

gfxbench vk-5-normal has a shader that sampels into a texels[] array at
the top, then in a loop calls a GLSL function passing texels[] in by
value.  This resulted in a copy to a temp inside the loop, which got
lowered to scratch stores since it was pretty big.

By doing find_array_copies(), we notice that it's equivalent to
copy_deref, then get to copy-propagate from the array at the top.  Then we
only have to set up the scratch array outside of the loop and load_scratch
from it in the called function inside the loop.  This also causes there to
be less spilling, stps 1144 -> 354 and ldps 826->36.

However, it doesn't seem to change performance on the test.  So, while
this seems to be an improvement for the shader, and we could maybe even do
better by rematerializing the txl samples inside the loop instead of
storing the texture fetches to scratch in the first place, it doesn't
currently seem worth pursuing more optimization of this shader.

No change on freedreno shader-db.

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

2 years agoturnip: Add nir_opt_conditional_discard.
Emma Anholt [Fri, 15 Apr 2022 18:17:50 +0000 (11:17 -0700)]
turnip: Add nir_opt_conditional_discard.

We can easily do discard_if in the backend without control flow, but it
wasn't done in ir3 because the GL frontend already did it for us.

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

2 years agofreedreno/ir3: Make sched nodes before adding deps.
Emma Anholt [Mon, 18 Apr 2022 19:37:19 +0000 (12:37 -0700)]
freedreno/ir3: Make sched nodes before adding deps.

The mark_kill_path() during dep setup follows SSA srcs, which when a phi
is involved may include a def from later in the same block, that we hadn't
created yet.

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

2 years agoturnip: Add TU_DEBUG=layout for dumping image layouts.
Emma Anholt [Fri, 15 Apr 2022 18:16:40 +0000 (11:16 -0700)]
turnip: Add TU_DEBUG=layout for dumping image layouts.

This was useful for comparing image allocations between gfxbench
gl_5_normal and vk_5_normal to see if rendering was generally equivalent
(formats, MSAA, UBWC choices, and notably gfxbench vk was choosing DXT5
instead of ASTC on non-android builds!)

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

2 years agoturnip: Try harder to keep LRZ valid and fix a few edge cases
Danylo Piliaiev [Mon, 18 Apr 2022 17:26:48 +0000 (20:26 +0300)]
turnip: Try harder to keep LRZ valid and fix a few edge cases

Refactored tu6_calculate_lrz_state and added comments.

1) If there is no depth write we could keep LRZ valid with any
compare op, we just have to temporary disable LRZ for incompatible
ops in such case.

2) Found that VK_COMPARE_OP_EQUAL is not compatible with LRZ,
and since it doesn't change LRZ buffer - LRZ could be just
temporary disabled. This fixes rendering of grass/trees in
PUBG mobile on angle.

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

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

2 years agonouveau: Skip cctl for atomic counters in tgsi
M Henning [Sun, 30 Jan 2022 03:20:58 +0000 (22:20 -0500)]
nouveau: Skip cctl for atomic counters in tgsi

The tgsi path already marked all aliasing loads of atomic counters with
CACHE_CG, so we don't need to emit a cctl. This patch uses the cache
flag on the atomic to model whether the L1 cache needs the stale
values to be flushed or not.

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

2 years agonouveau: Emit cctl to flush L1 cache for atomics
M Henning [Mon, 3 Jan 2022 01:29:02 +0000 (20:29 -0500)]
nouveau: Emit cctl to flush L1 cache for atomics

We were previously only emitting these for CAS, but all of the atomics
seem to need it.

Fixes spec@glsl-es-3.10@execution@fs-simple-atomic-counter-inc-dec-read
on kepler with NV50_PROG_USE_NIR=1

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

2 years agodzn: refactor error-handling
Boris Brezillon [Fri, 8 Apr 2022 11:32:12 +0000 (13:32 +0200)]
dzn: refactor error-handling

Here's a couple of cleanups to the error-handling code, now that we're
no longer using ComPtr<T>.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: remove needless defines
Erik Faye-Lund [Fri, 8 Apr 2022 08:41:24 +0000 (10:41 +0200)]
dzn: remove needless defines

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: merge util sources
Erik Faye-Lund [Thu, 7 Apr 2022 16:16:19 +0000 (18:16 +0200)]
dzn: merge util sources

There, no more C and C++ sources of the same base-name. We can do both
in one source.

This is our last C++ source file, so let's also clean away the C++20
mess in meson.build.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: port code to plain c
Erik Faye-Lund [Wed, 6 Apr 2022 13:04:34 +0000 (15:04 +0200)]
dzn: port code to plain c

This does quite a lot in one go, simply because C and C++ are too
different to cleanly move from one language to another. But hopefully
this won't create too many rebase-issues.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: do not set unused default member initializer
Erik Faye-Lund [Wed, 6 Apr 2022 12:38:43 +0000 (14:38 +0200)]
dzn: do not set unused default member initializer

These objects aren't allocated using C++ constructors, so these default
member initializers does nothing.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: c-style casts
Erik Faye-Lund [Thu, 7 Apr 2022 15:22:04 +0000 (17:22 +0200)]
dzn: c-style casts

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: use c-style initialization
Erik Faye-Lund [Wed, 6 Apr 2022 13:09:09 +0000 (15:09 +0200)]
dzn: use c-style initialization

Here's a few cases where we can use C-style initialization up-front,
which reduces the diffs later on.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: use c-style for-statement
Erik Faye-Lund [Thu, 7 Apr 2022 12:53:02 +0000 (14:53 +0200)]
dzn: use c-style for-statement

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: use define instead of constexpr
Erik Faye-Lund [Thu, 7 Apr 2022 12:51:37 +0000 (14:51 +0200)]
dzn: use define instead of constexpr

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: no more reinterpret_cast
Erik Faye-Lund [Wed, 6 Apr 2022 12:58:25 +0000 (14:58 +0200)]
dzn: no more reinterpret_cast

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: drop using references
Erik Faye-Lund [Wed, 6 Apr 2022 12:36:11 +0000 (14:36 +0200)]
dzn: drop using references

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: drop auto usage
Erik Faye-Lund [Wed, 6 Apr 2022 12:30:59 +0000 (14:30 +0200)]
dzn: drop auto usage

The auto keyword isn't available in C, so let's drop it and just use
explicit types instead.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: add a bunch of missing struct-keywords
Erik Faye-Lund [Tue, 5 Apr 2022 15:41:20 +0000 (17:41 +0200)]
dzn: add a bunch of missing struct-keywords

If we're going to have any chance of porting this code to C, we're
going to have to be better at spelling out structs.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: port to d3d12 c-api
Erik Faye-Lund [Fri, 25 Mar 2022 16:08:50 +0000 (17:08 +0100)]
dzn: port to d3d12 c-api

Using the vulkan-helpers from C++ code has turned out to have a lot of
friction, because no other driver uses C++ for this.

So let's bite the bullet and call the D3D12 C-API instead. The C-API
wasn't really around when we started out, but it's there now.

This is still far from ideal; we should really create some wrapping
macros to generate the extremely verbose COM calls.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: pass IDXGIAdapter1 to d3d12_create_device
Erik Faye-Lund [Thu, 7 Apr 2022 12:56:47 +0000 (14:56 +0200)]
dzn: pass IDXGIAdapter1 to d3d12_create_device

The D3D12 C API doesn't know about the relationship between
IDXGIAdapter1 and IUnknown. And there's no good reason to care about it
here either. So let's just pass the right type all the way.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: use ID3D10Blob instead of ID3DBlob
Erik Faye-Lund [Fri, 25 Mar 2022 15:29:48 +0000 (16:29 +0100)]
dzn: use ID3D10Blob instead of ID3DBlob

In the C interface, there's no such alias.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: always use ID3D12GraphicsCommandList1
Erik Faye-Lund [Fri, 25 Mar 2022 14:59:23 +0000 (15:59 +0100)]
dzn: always use ID3D12GraphicsCommandList1

In the C-interface, ID3D12GraphicsCommandList1 and
ID3D12GraphicsCommandList are unrelated types. So let's make sure we
consistenly use the most up-to-date version.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: always use ID3D12Device1
Erik Faye-Lund [Fri, 25 Mar 2022 14:59:23 +0000 (15:59 +0100)]
dzn: always use ID3D12Device1

In the C-interface, ID3D12Device1 and ID3D12Device are unrelated types.
So let's make sure we consistenly use the most up-to-date version.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: remove all usage of ComPtr<T>
Erik Faye-Lund [Fri, 25 Mar 2022 12:15:44 +0000 (13:15 +0100)]
dzn: remove all usage of ComPtr<T>

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agodzn: fixup indent
Erik Faye-Lund [Fri, 8 Apr 2022 07:56:58 +0000 (09:56 +0200)]
dzn: fixup indent

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

2 years agoaco: Reuse previous -1 result in find_msb to avoid using VOP3.
Georg Lehmann [Fri, 31 Dec 2021 16:38:25 +0000 (17:38 +0100)]
aco: Reuse previous -1 result in find_msb to avoid using VOP3.

Totals:
CodeSize: 388934388 -> 388933712 (-0.00%)

Totals from 208 (0.15% of 134913) affected shaders:
CodeSize: 2008016 -> 2007340 (-0.03%)

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

2 years agozink: Remove redundant framebuffer_mtx from zink_screen.h
Yonggang Luo [Tue, 19 Apr 2022 08:33:26 +0000 (16:33 +0800)]
zink: Remove redundant framebuffer_mtx from zink_screen.h

Fixes: beb71504f42 ("zink: remove the worst part of basic framebuffer support")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16025>

2 years agoci/iris: mark another test as flaky
Lionel Landwerlin [Tue, 19 Apr 2022 12:53:54 +0000 (15:53 +0300)]
ci/iris: mark another test as flaky

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16032>

2 years agointel/fs: tidy up lower of ray queries
Lionel Landwerlin [Wed, 13 Apr 2022 13:04:25 +0000 (16:04 +0300)]
intel/fs: tidy up lower of ray queries

We already expect a single function.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15946>

2 years agodzn: Pass the right type to CreateCommandList() in the reset path
Boris Brezillon [Tue, 19 Apr 2022 08:00:51 +0000 (01:00 -0700)]
dzn: Pass the right type to CreateCommandList() in the reset path

The Command allocator and command list type must match, but we
are forcing it to D3D12_COMMAND_LIST_TYPE_DIRECT in the reset path.

Fixes: a012b219640 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16023>

2 years agointel/compiler: invalidate metadata in brw_nir_initialize_mue
Marcin Ślusarz [Wed, 13 Apr 2022 12:37:15 +0000 (14:37 +0200)]
intel/compiler: invalidate metadata in brw_nir_initialize_mue

New "if" blocks may have been inserted.

Fixes: bc4f8c073a2 ("intel/compiler: inject MUE initialization")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>

2 years agointel/compiler: invalidate all metadata in brw_nir_lower_intersection_shader
Marcin Ślusarz [Wed, 13 Apr 2022 11:15:28 +0000 (13:15 +0200)]
intel/compiler: invalidate all metadata in brw_nir_lower_intersection_shader

New "if" blocks were inserted.

Fixes: 303378e1dd4 ("intel/rt: Add lowering for combined intersection/any-hit shaders")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>

2 years agoanv: invalidate all metadata in anv_nir_lower_ubo_loads
Marcin Ślusarz [Wed, 13 Apr 2022 11:09:23 +0000 (13:09 +0200)]
anv: invalidate all metadata in anv_nir_lower_ubo_loads

lower_ubo_load_instr may insert "if" blocks.

Fixes: 61749b5a151 ("anv: Add a pass for lowering A64 UBO access")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>

2 years agoanv: allow getting the address of the beginning of the batch
Lionel Landwerlin [Wed, 13 Apr 2022 08:08:44 +0000 (11:08 +0300)]
anv: allow getting the address of the beginning of the batch

There is no reason not to be able to get it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 34a0ce58c7f8 ("anv: add a new execution mode for secondary command buffers")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15968>

2 years agointel/compiler: fix singleton pointer coverity warning
Alexey Bozhenko [Fri, 15 Apr 2022 15:38:03 +0000 (18:38 +0300)]
intel/compiler: fix singleton pointer coverity warning

fix brw_kernel::stats member that was declared as a variable
but used as a pointer to array of 3 elements

CID: 1503279

Signed-off-by: Bozhenko Alexey <oleksii.bozhenko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15975>

2 years agopvr: Fix clang-format errors caused by vk outarrays.
Karmjit Mahil [Mon, 28 Mar 2022 15:50:48 +0000 (16:50 +0100)]
pvr: Fix clang-format errors caused by vk outarrays.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15944>

2 years agodzn: Add support for sampleRateShading
Boris Brezillon [Tue, 12 Apr 2022 14:31:50 +0000 (07:31 -0700)]
dzn: Add support for sampleRateShading

Forward the sample-rate shading info to spirv_to_dxil() so we can
claim to support sampleRateShading.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15916>

2 years agomicrosoft/spirv_to_dxil: Allow forcing per-sample shading
Boris Brezillon [Wed, 13 Apr 2022 09:14:36 +0000 (02:14 -0700)]
microsoft/spirv_to_dxil: Allow forcing per-sample shading

Needed to support VkPipelineMultisampleStateCreateInfo::sampleShadingEnable.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15916>

2 years agomicrosoft/compiler: Add a dunmmy SV_SampleIndex when needed
Boris Brezillon [Thu, 14 Apr 2022 14:21:26 +0000 (07:21 -0700)]
microsoft/compiler: Add a dunmmy SV_SampleIndex when needed

When per-sample shading is forced and all input variables have a flat
interpolation, DXIL validation detects a mismatch between the
SampleFrequency property and the fact that no variables are per-sample
and SV_SampleIndex is never read. When that happens, add a dummy
SV_SampleIndex.

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

2 years agov3d: enable GL_ARB_copy_image extension
Juan A. Suarez Romero [Thu, 17 Mar 2022 09:29:38 +0000 (10:29 +0100)]
v3d: enable GL_ARB_copy_image extension

Enable the proper capability to get activate this extension.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4588
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>

2 years agov3d: define our own canonical supported formats
Juan A. Suarez Romero [Wed, 13 Apr 2022 18:08:45 +0000 (20:08 +0200)]
v3d: define our own canonical supported formats

Some of the canonical formats defined by Gallium are not TLB compatible,
so we need to provide an alternative.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>

2 years agogallium: add hook on getting canonical format
Juan A. Suarez Romero [Wed, 13 Apr 2022 18:06:21 +0000 (20:06 +0200)]
gallium: add hook on getting canonical format

On swizzled copies canonical formats are used to reduce the formats to a
simpler subset.

Nevertheless, it is possible that some of the canonical formats defined
in Gallium are actually not supported by the drivers themselves.

This provides a driver-defined hook that can be used to provide an
alternative canonical format in case the canonical one defined by
Gallium is not supported by the driver.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>

2 years agov3d: use surface format defined on pipe_blit
Juan A. Suarez Romero [Wed, 13 Apr 2022 17:42:37 +0000 (19:42 +0200)]
v3d: use surface format defined on pipe_blit

When trying to perform a TLB-based blit, we need to create a surface out
of the src and dst resources. But instead of using the same formats as
the resources, we need to use the format that is passed through
pipe_blit_info.

This was making some cases to use the render-based blit instead of the
TLB-based blit, which is more performant.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>

2 years agov3d: do not tile 1D textures
Juan A. Suarez Romero [Tue, 29 Mar 2022 11:53:27 +0000 (13:53 +0200)]
v3d: do not tile 1D textures

Hardware already support 1D untiled textures, so no need to convert them
to tile for render-based blit.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>

2 years agov3d: report the correct unsupported blit format
Juan A. Suarez Romero [Wed, 13 Apr 2022 12:32:19 +0000 (14:32 +0200)]
v3d: report the correct unsupported blit format

We were reporting the resource format instead of the surface format for
unsupported render blit formats.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>

2 years agoanv: implement DEBUG_SYNC
Lionel Landwerlin [Tue, 22 Feb 2022 08:38:05 +0000 (10:38 +0200)]
anv: implement DEBUG_SYNC

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15950>

2 years agoanv/intel: add a new debug flag for stalling after every draw/dispatch
Lionel Landwerlin [Tue, 22 Feb 2022 08:37:07 +0000 (10:37 +0200)]
anv/intel: add a new debug flag for stalling after every draw/dispatch

Useful for hang debugging. Previously Anv incorrectly used DEBUG_SYNC
for this.

v2: Update documentations for sync/stall (Jordan)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15950>

2 years agoanv: improve INTEL_DEBUG for submit
Lionel Landwerlin [Fri, 22 Oct 2021 13:10:01 +0000 (16:10 +0300)]
anv: improve INTEL_DEBUG for submit

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15950>

2 years agonir: introduce and use nir_component_mask
Erik Faye-Lund [Thu, 24 Mar 2022 09:36:06 +0000 (10:36 +0100)]
nir: introduce and use nir_component_mask

The BITFIELD_MASK() macro is intended for using with actual bitfields,
not with nir_component_mask_t. This means we do some extra work to
handle values that are invalid for nir_component_mask_t in the first
place.

This eliminates some warnings on Clang, where the compiler complains
about casting UINT32_MAX to UINT16_MAX.

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

2 years agomeson: turn on -Wno-unused-function project-wide
Erik Faye-Lund [Thu, 24 Mar 2022 09:34:41 +0000 (10:34 +0100)]
meson: turn on -Wno-unused-function project-wide

We generate a lot of functions without knowing if they end up being used
or not. So we can't easily avoid these warnings.

This fixes a bunch of warnings for me when building with Clang.

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

2 years agovulkan: explicitly cast object-type enum
Erik Faye-Lund [Thu, 24 Mar 2022 08:57:10 +0000 (09:57 +0100)]
vulkan: explicitly cast object-type enum

VkObjectType and VkDebugReportObjectTypeEXT has the same enum-values.
Why the Vulkan WG thought this was a good idea, beats me. But it's what
we have to live with now.

Anyway, instead of having a statement that implicitly casts two
different values from the former to the latter, let's fully relsove the
type as the former, and cast the value when using it instead.

Fixes: 41318a58196 ("vulkan: Use vk_object_base::type for debug_report")
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15547>

2 years agoradv: do not support UNIFORM_TEXEL_BUFFER with SRGB
Samuel Pitoiset [Mon, 18 Apr 2022 13:38:00 +0000 (15:38 +0200)]
radv: do not support UNIFORM_TEXEL_BUFFER with SRGB

Looks like it can't be supported. Also disabled by PRO/AMDVLK.

Fixes new CTS dEQP-VK.texture.texel_buffer.uniform.srgb.*.

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

2 years agoradv: initialize the vertex input interface state in only one place
Samuel Pitoiset [Thu, 14 Apr 2022 13:09:03 +0000 (15:09 +0200)]
radv: initialize the vertex input interface state in only one place

Instead of copying states from these structures at many different
places, do it only once. Will help VK_EXT_graphics_pipeline_library.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15967>

2 years agoradv: use the hardware primitive topology everywhere
Samuel Pitoiset [Thu, 14 Apr 2022 12:32:17 +0000 (14:32 +0200)]
radv: use the hardware primitive topology everywhere

Instead of mixing the VK type vs HW type everywhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15967>

2 years agoradv: mark all active stages earlier in the pipeline creation path
Samuel Pitoiset [Fri, 15 Apr 2022 06:10:36 +0000 (08:10 +0200)]
radv: mark all active stages earlier in the pipeline creation path

Few pCreateInfo structs have to be ignored based on the active stages
and this will be used to make a union of stages from graphics libraries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15967>

2 years agozink: selectively disable dynamic vertex stride
Mike Blumenkrantz [Mon, 18 Apr 2022 20:00:35 +0000 (16:00 -0400)]
zink: selectively disable dynamic vertex stride

if the vertex state doesn't meet the requirements to use this feature,
fall back to fully-baked pipelines instead of violating spec

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

2 years agozink: store min required stride values on the vertex state
Mike Blumenkrantz [Mon, 18 Apr 2022 19:48:56 +0000 (15:48 -0400)]
zink: store min required stride values on the vertex state

this will be useful shortly

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

2 years agozink: always bind gfx pipeline at the top of draw
Mike Blumenkrantz [Mon, 18 Apr 2022 19:06:58 +0000 (15:06 -0400)]
zink: always bind gfx pipeline at the top of draw

at one point I thought it'd be cool to try and async compile a pipeline
between shader bind and draw emit, but this is an unrealistic pipe dream
that just makes things more complicated

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

2 years agozink: rework zink_kopper_update() assert
Mike Blumenkrantz [Mon, 18 Apr 2022 22:25:55 +0000 (18:25 -0400)]
zink: rework zink_kopper_update() assert

the dt might have been killed, so just assert that it's a display target

fixes #6317

Fixes: 8ade5588e39 ("zink: add kopper api")

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

2 years agozink: make a kopper debug print into an error
Mike Blumenkrantz [Mon, 18 Apr 2022 18:39:24 +0000 (14:39 -0400)]
zink: make a kopper debug print into an error

Fixes: 8ade5588e39 ("zink: add kopper api")

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

2 years agozink: remove ZINK_NO_TIMELINES
Mike Blumenkrantz [Mon, 18 Apr 2022 21:33:35 +0000 (17:33 -0400)]
zink: remove ZINK_NO_TIMELINES

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

2 years agozink: remove the worst part of basic framebuffer support
Mike Blumenkrantz [Tue, 12 Apr 2022 19:03:39 +0000 (15:03 -0400)]
zink: remove the worst part of basic framebuffer support

this was one of the most complex interactions in zink, and now it's
finally gone

thanks to @jekstrand for licensing his patented Delete The Code methodology
for this project

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

2 years agozink: rename imageless framebuffer functions
Mike Blumenkrantz [Tue, 12 Apr 2022 19:01:31 +0000 (15:01 -0400)]
zink: rename imageless framebuffer functions

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

2 years agozink: remove framebuffer indirection
Mike Blumenkrantz [Tue, 12 Apr 2022 19:00:38 +0000 (15:00 -0400)]
zink: remove framebuffer indirection

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

2 years agozink: delete all non-imageless framebuffer code
Mike Blumenkrantz [Tue, 12 Apr 2022 18:59:16 +0000 (14:59 -0400)]
zink: delete all non-imageless framebuffer code

hooray it's finally gone

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

2 years agozink: require KHR_imageless_framebuffer
Mike Blumenkrantz [Tue, 12 Apr 2022 18:55:37 +0000 (14:55 -0400)]
zink: require KHR_imageless_framebuffer

this allows for deleting tons of code

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

2 years agozink: require renderpass2
Mike Blumenkrantz [Tue, 12 Apr 2022 18:50:21 +0000 (14:50 -0400)]
zink: require renderpass2

drivers should be able to support this, and it allows for deleting
a lot of untested code

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

2 years agozink: only use VK_DEPENDENCY_BY_REGION_BIT if sync2 is available
Mike Blumenkrantz [Tue, 12 Apr 2022 18:53:09 +0000 (14:53 -0400)]
zink: only use VK_DEPENDENCY_BY_REGION_BIT if sync2 is available

this breaks texture barriers since non-sync2 barriers don't have this
available

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

2 years agozink: hook up VK_KHR_create_renderpass2
Mike Blumenkrantz [Tue, 12 Apr 2022 18:48:52 +0000 (14:48 -0400)]
zink: hook up VK_KHR_create_renderpass2

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

2 years agozink: remove driver-based max_fences throttling
Mike Blumenkrantz [Tue, 12 Apr 2022 19:07:29 +0000 (15:07 -0400)]
zink: remove driver-based max_fences throttling

there are no more fence objects, so there's no need to do driver-specific
clamping on them

the mechanism remains intact to handle ETOOMANYSUBMITS

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

2 years agozink: rename zink_query::batch_id
Mike Blumenkrantz [Fri, 25 Mar 2022 16:21:58 +0000 (12:21 -0400)]
zink: rename zink_query::batch_id

this conflicts with zink_fence::batch_id and is confusing in grep

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

2 years agozink: remove batch lock
Mike Blumenkrantz [Fri, 25 Mar 2022 16:20:41 +0000 (12:20 -0400)]
zink: remove batch lock

this is no longer needed and allows deleting some awful code

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

2 years agozink: require timeline semaphores
Mike Blumenkrantz [Fri, 25 Mar 2022 16:18:42 +0000 (12:18 -0400)]
zink: require timeline semaphores

this allows the removal of tons of awful code

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

2 years agozink: do not create fences at all if timeline semaphores are supported
Mike Blumenkrantz [Fri, 25 Mar 2022 16:09:50 +0000 (12:09 -0400)]
zink: do not create fences at all if timeline semaphores are supported

there's no point in doing this, as it's just extra objects that don't need
to ever be used

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

2 years agozink: fix extended restart prim types without dynamic state2
Mike Blumenkrantz [Fri, 15 Apr 2022 16:59:03 +0000 (12:59 -0400)]
zink: fix extended restart prim types without dynamic state2

these are all allowed with the ext

cc: mesa-stable

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

2 years agozink: support restart with PIPE_PRIM_LINES_ADJACENCY if ext is available
Mike Blumenkrantz [Fri, 15 Apr 2022 16:57:25 +0000 (12:57 -0400)]
zink: support restart with PIPE_PRIM_LINES_ADJACENCY if ext is available

cc: mesa-stable

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

2 years agozink: unconditionally set line width on rasterizer state change
Mike Blumenkrantz [Thu, 14 Apr 2022 20:18:10 +0000 (16:18 -0400)]
zink: unconditionally set line width on rasterizer state change

the pipe cap is used for gating wideline support, so this will always
be 1.0 when not supported

furthermore, the previous code wasn't accurately checking line width
for tess shaders, breaking tests

cc: mesa-stable

fixes (nv):
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_PatchVerticesIn

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

2 years agozink: use mixed zs renderpass for depth read/write
Mike Blumenkrantz [Thu, 14 Apr 2022 13:02:28 +0000 (09:02 -0400)]
zink: use mixed zs renderpass for depth read/write

this is triggered by u_blitter when doing src==dst blits

Fixes: 7781a75229d ("zink: add a renderpass flag for mixed zs layout")

affects:
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality*

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

2 years agozink: reject resource creation if format features don't match attachment
Mike Blumenkrantz [Wed, 13 Apr 2022 18:19:58 +0000 (14:19 -0400)]
zink: reject resource creation if format features don't match attachment

if a rendertarget-specified image can't be a rendertarget or a blit dst
then it can't be used for the designated functionality and must be rejected

cc: mesa-stable

fixes hangs on various nv driver versions:
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgba5551_fastest

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

2 years agozink: add baseline for amdpro
Mike Blumenkrantz [Mon, 18 Apr 2022 14:54:17 +0000 (10:54 -0400)]
zink: add baseline for amdpro

got some work to do here

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

2 years agozink: disable EXT_extended_dynamic_state2 on AMDPRO
Mike Blumenkrantz [Fri, 15 Apr 2022 17:54:59 +0000 (13:54 -0400)]
zink: disable EXT_extended_dynamic_state2 on AMDPRO

this is broken beyond space and time in 22.10-1395274

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

2 years agozink: remove tcs patch slot map
Mike Blumenkrantz [Fri, 15 Apr 2022 15:18:07 +0000 (11:18 -0400)]
zink: remove tcs patch slot map

this is illegal, and we'll just have to eat some piglit fails
until indirects are handled

Fixes: f7ade1f1885 ("zink: simplify shader i/o assignment")

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

2 years agogallium: rename ldexp shader-cap
Erik Faye-Lund [Wed, 13 Apr 2022 10:46:55 +0000 (12:46 +0200)]
gallium: rename ldexp shader-cap

This is no longer TGSI specific, so let's rename it to reflect
reality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15922>

2 years agogallium: rename dfracexp/dldexp shader-cap
Erik Faye-Lund [Wed, 13 Apr 2022 10:46:55 +0000 (12:46 +0200)]
gallium: rename dfracexp/dldexp shader-cap

This is no longer TGSI specific, so let's rename it to reflect
reality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15922>

2 years agogallium: rename dround shader-cap
Erik Faye-Lund [Wed, 13 Apr 2022 10:46:55 +0000 (12:46 +0200)]
gallium: rename dround shader-cap

This is no longer TGSI specific, so let's rename it to reflect
reality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15922>

2 years agogallium: rename continue shader-cap
Erik Faye-Lund [Wed, 13 Apr 2022 10:46:55 +0000 (12:46 +0200)]
gallium: rename continue shader-cap

This is no longer TGSI specific, so let's rename it to reflect
reality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15922>