Konstantin Seurer
b3896fa8c7
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 >
2022-04-20 10:46:29 +00:00
Lionel Landwerlin
a468f26ca5
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 >
2022-04-20 10:37:24 +03:00
Emma Anholt
30daa7d6d8
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 >
2022-04-19 20:05:41 +00:00
Emma Anholt
73e1a54623
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 >
2022-04-19 20:05:41 +00:00
Emma Anholt
fc96397256
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 >
2022-04-19 20:05:41 +00:00
Emma Anholt
bac7ec1a89
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 >
2022-04-19 20:05:41 +00:00
Emma Anholt
21282879f9
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 >
2022-04-19 20:05:41 +00:00
Emma Anholt
4850dbb3f9
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 >
2022-04-19 20:05:41 +00:00
Yonggang Luo
a3a43e5fa8
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 >
2022-04-19 19:38:47 +00:00
Yonggang Luo
4ead2f6579
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 >
2022-04-19 19:38:47 +00:00
Emma Anholt
550975f229
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 >
2022-04-19 18:45:30 +00:00
Emma Anholt
7ba63f516a
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 >
2022-04-19 18:45:30 +00:00
Emma Anholt
1bcd848816
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 >
2022-04-19 18:45:29 +00:00
Emma Anholt
7ba0c44607
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 >
2022-04-19 18:45:29 +00:00
Emma Anholt
d60282f5d2
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 >
2022-04-19 18:45:29 +00:00
Emma Anholt
ce15bf19fb
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 >
2022-04-19 18:45:29 +00:00
Danylo Piliaiev
2c683519e2
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 >
2022-04-19 18:06:58 +00:00
M Henning
8313a9231c
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 >
2022-04-19 16:33:36 +00:00
M Henning
850197b3e0
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 >
2022-04-19 16:33:36 +00:00
Boris Brezillon
9eace7f2e4
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
cfdaf1af9b
dzn: remove needless defines
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
2ca4e21df7
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
0551f8ed62
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
b369e10d08
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
c5e979f632
dzn: c-style casts
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
3d608de882
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
05af6f0434
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
502c36c07d
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
5a9571ee2c
dzn: no more reinterpret_cast
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
79119ac478
dzn: drop using references
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
bd8e8537cc
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
d61c2e965b
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
4903a7c051
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
4753222e62
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
3ba021cdd0
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
8c6f50efdb
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
411dfc574c
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
5f17d070a9
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 >
2022-04-19 15:39:48 +00:00
Erik Faye-Lund
74228c32ee
dzn: fixup indent
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816 >
2022-04-19 15:39:48 +00:00
Georg Lehmann
d12b5e7633
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 >
2022-04-19 15:18:58 +00:00
Yonggang Luo
ebb099a9b0
zink: Remove redundant framebuffer_mtx from zink_screen.h
...
Fixes: beb71504f4 ("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 >
2022-04-19 15:02:33 +00:00
Lionel Landwerlin
2ab57e056d
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 >
2022-04-19 14:27:26 +00:00
Lionel Landwerlin
8ef8e72aac
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 >
2022-04-19 12:56:06 +00:00
Boris Brezillon
9fd02d49b8
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: a012b21964 ("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 >
2022-04-19 12:07:38 +00:00
Marcin Ślusarz
5dace41c10
intel/compiler: invalidate metadata in brw_nir_initialize_mue
...
New "if" blocks may have been inserted.
Fixes: bc4f8c073a ("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 >
2022-04-19 11:43:55 +00:00
Marcin Ślusarz
4fddef33d5
intel/compiler: invalidate all metadata in brw_nir_lower_intersection_shader
...
New "if" blocks were inserted.
Fixes: 303378e1dd ("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 >
2022-04-19 11:43:55 +00:00
Marcin Ślusarz
5bd3ba5b67
anv: invalidate all metadata in anv_nir_lower_ubo_loads
...
lower_ubo_load_instr may insert "if" blocks.
Fixes: 61749b5a15 ("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 >
2022-04-19 11:43:55 +00:00
Lionel Landwerlin
184084e21c
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: 34a0ce58c7 ("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 >
2022-04-19 10:43:29 +00:00
Alexey Bozhenko
2d7d907ad1
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 >
2022-04-19 12:36:10 +03:00
Karmjit Mahil
4c6bec2c0c
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 >
2022-04-19 09:13:07 +00:00