Jesse Natalie
007b0fdff0
dzn: Initialize memoryTypeBits for querying properties on imported handles
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339 >
2024-03-25 19:11:35 +00:00
Jesse Natalie
5957778c16
dzn: Include vulkan_core.h instead of vulkan.h in the device enum header
...
Prevents pulling in X11 "None" define into the DXCore implementation,
which conflicts with updated DXCore headers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10803
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339 >
2024-03-25 19:11:35 +00:00
Jesse Natalie
c75c485d7d
dzn: Support bufferDeviceAddress
...
Flip on the caps/extensions, use their presence to turn on bindless just like
descriptor_indexing, use the buffer flag to indicate UAV access, and fix up
the getter to return the kind of data we want.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28028 >
2024-03-07 22:35:09 +00:00
Luca Bacci
fe520ecfbf
meson,windows: Use relative paths in Vulkan ICD manifest files
...
See https://github.com/msys2/MINGW-packages/issues/16065
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27468 >
2024-03-01 20:09:59 +00:00
Jesse Natalie
0ac7ea7578
dzn: Fix conditions for barrier in texture-converting copy case
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27864 >
2024-02-29 19:56:59 +00:00
Jesse Natalie
161a90abbd
dzn: Add a driconf option to disable dzn for specific apps and use it for RDR2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
660c7fe6a7
dzn: Fix tessellation shader insertion into PSO desc
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
d5131e5f86
dzn: Simultaneous-access is mutually exclusive with MSAA
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Eric Engestrom
5f373dec88
dzn: enable VK_EXT_headless_surface on all platforms except Windows
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448 >
2024-02-06 20:32:38 +00:00
Jesse Natalie
559f31e202
dzn: Use blits for all non-averaging resolves
...
Trying to do min/max resolves on depth/stencil is failing for me on
hardware, just simplify things and always use a manual resolve for
modes that aren't average.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:52 +00:00
Jesse Natalie
70fa127c97
dzn: Use correct format for depth/stencil resolves
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:52 +00:00
Jesse Natalie
973c5bd047
dzn: Don't resolve for RESOLVE_MODE_NONE
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:52 +00:00
Jesse Natalie
dd7cfd5255
dzn: Add a debug flag for forcing off native view instancing
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:52 +00:00
Jesse Natalie
a85e8058cb
dzn: Support non-static samplers for meta
...
Some hardware that doesn't support true static samplers, emulates it
by copying all static samplers into a reserved portion of every descriptor
heap. To support Vulkan's required 4000 live sampler limit in bindless
mode, D3D is now able to create descriptor heaps which do not have a reserved
portion. Any descriptor heaps above the MaxSamplerDescriptorHeapSizeWithStaticSamplers
limit will not have that reserved portion and cannot be used with static samplers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:51 +00:00
Jesse Natalie
c286c01136
dzn: Add barrier to copy source for DispatchIndirect copies
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:51 +00:00
Jesse Natalie
581a23c0cc
dzn: Add missing handling of VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348 >
2024-02-02 01:19:51 +00:00
Daniel Schürmann
26c8f13ff5
vulkan: enable VK_KHR_shader_expect_assume
...
This implementation ignores the hints.
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27265 >
2024-01-30 19:09:42 +00:00
Jesse Natalie
24f14bfacc
dzn: Add missing blit source barriers for enhanced barriers
...
I was under the impression these would never be needed, since the source
should already be in the right GENERIC_READ layout, but when resolving
rendering attachments with a blit, the source is still in the layout that
it was in at the end of rendering.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313 >
2024-01-29 17:46:11 +00:00
Jesse Natalie
f91ac2ff41
dzn: Add missing condition to immutable sampler init loop
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313 >
2024-01-29 17:46:11 +00:00
Jesse Natalie
fd89ca82a6
dzn: Add a stencil blit fallback
...
Not all D3D hardware supports specifying the stencil ref value from the
pixel shader. For such hardware, stencil blits need to do the awful
8-pass one-bit-per-pass discard-to-not-write blit approach.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313 >
2024-01-29 17:46:11 +00:00
Jesse Natalie
4fede8d419
dzn: Fix path passed to CreateDeviceFactory
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27287 >
2024-01-26 01:30:00 +00:00
Jesse Natalie
fa1c9618f9
dzn: Don't set view instancing mask until after the PSO
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27286 >
2024-01-26 01:05:02 +00:00
Jesse Natalie
9b495ee8a9
dzn: Disable depth/stencil for partial binding from dynamic rendering
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224 >
2024-01-24 22:32:59 +00:00
Jesse Natalie
f4c6d9d9a9
dzn: Handle VkBindImageMemorySwapchainInfoKHR
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224 >
2024-01-24 22:32:59 +00:00
Jesse Natalie
df684ee653
dzn: Fix enhanced barrier layout for depth blits
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224 >
2024-01-24 22:32:59 +00:00
Jesse Natalie
fcd56e31f7
dzn: Implement maintenance3 VariableDescriptorCountLayoutSupport
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224 >
2024-01-24 22:32:59 +00:00
Jesse Natalie
ebcab145cf
dzn: Add a debug option to enable experimental shader models
...
This allows us to run with unsigned shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160 >
2024-01-20 00:07:15 +00:00
Jesse Natalie
733b7fe831
microsoft/compiler: Declare shader model 6.8 / validator 1.8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160 >
2024-01-20 00:07:15 +00:00
Yonggang Luo
1e6fcd6a61
dzn: Remove #if D3D12_SDK_VERSION blocks now that 611 is required
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26794 >
2023-12-22 13:35:35 +00:00
Jesse Natalie
555955fc9f
dzn: Fix 3D to 2D image copies
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26795 >
2023-12-22 00:29:22 +00:00
jphuang
02a873fa2a
dzn: Change dst image layout according to aspect
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26532 >
2023-12-06 03:36:07 +00:00
Yonggang Luo
e568ef122a
d3d12,dzn: Simplify the usage of #include <wsl/winadapter.h>
...
Now wsl/winadapter.h are platform independent
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26508 >
2023-12-05 03:24:30 +00:00
Yonggang Luo
767aa00230
dzn: Fixes -Werror=incompatible-pointer-type
...
Error message:
../../src/microsoft/vulkan/dzn_device.c:3840:108: error: passing argument 5 of 'device->dev13->lpVtbl->OpenExistingHeapFromAddress1' from incompatible pointer type [-Werror=incompatible-pointer-types]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26508 >
2023-12-05 03:24:30 +00:00
Yonggang Luo
84db4d5698
micosoft: decouple microsoft vulkan driver and compiler from gallium
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24440 >
2023-11-04 00:02:59 +00:00
Jesse Natalie
e51acb65ac
dzn: Fix memory type sorting
...
For a dGPU, we should have:
1. RAM
2. RAM + write-combined CPU access
3. RAM + cached CPU access
4. VRAM
Eventually there'll be VRAM + write-combined CPU access after 4, using "GPU upload heaps"
For an iGPU, we should have:
1. RAM (declared as device-local)
2. RAM + write-combined CPU access (declared as device-local)
3. RAM + cached CPU access (declared as device-local)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26037 >
2023-11-03 23:33:02 +00:00
Jesse Natalie
228329f4da
vulkan: Consolidate common ICD methods
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998 >
2023-11-03 20:01:14 +00:00
Jesse Natalie
32f0034ec9
vulkan: Remove no-longer-needed prototypes for ICD entrypoints
...
The comment around these is no longer true, vk_icd.h does in fact
have prototypes for these functions.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998 >
2023-11-03 20:01:14 +00:00
Jesse Natalie
5550c1daf4
dzn: Use vk_properties helper
...
Addresses part of https://gitlab.freedesktop.org/mesa/mesa/-/issues/9521
Required for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998
to actually work correctly for Dozen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26014 >
2023-11-03 00:00:13 +00:00
Jesse Natalie
8f9888fd75
dzn: Implement VK_MSFT_layered_driver
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25993 >
2023-11-01 22:17:16 +00:00
Caio Oliveira
3988d901ac
meson: Remove unnecessary inc_compiler mentions
...
The inc_compiler should come as part of idep_compiler, idep_nir or
idep_nir_headers dependency.
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> (v3dv)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25314 >
2023-09-22 14:52:50 +00:00
Alba Mendez
e3aab80d4f
meson: support installation tags
...
the only thing missing is to tag custom install targets, namely:
- ICDs (vulkan, glvnd, OpenCL, VA-API, VDPAU)
- Vulkan layers
- custom install script for megadrivers
- drirc file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24911 >
2023-09-11 13:00:45 +00:00
antonino
aa657247ce
vulkan/wsi: add vk_wsi_force_swapchain_to_current_extent driconf
...
Add a driconf to force the swapchain size to match
`VkSurfaceCapabilities2KHR::currentExtent` as a workaround for
misbehaved games
Fixes: 6139493ae3 ("vulkan/wsi: return VK_SUBOPTIMAL_KHR for sw/x11 on window resize")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24818 >
2023-09-06 00:10:41 +00:00
Alyssa Rosenzweig
cda1961835
treewide: Also handle struct nir_builder form
...
Via Coccinelle patch:
@def@
typedef bool;
typedef nir_builder;
typedef nir_instr;
typedef nir_def;
identifier fn, instr, intr, x, builder, data;
@@
static fn(struct nir_builder* builder,
-nir_instr *instr,
+nir_intrinsic_instr *intr,
...)
{
(
- if (instr->type != nir_instr_type_intrinsic)
- return false;
- nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
|
- nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
- if (instr->type != nir_instr_type_intrinsic)
- return false;
)
<...
(
-instr->x
+intr->instr.x
|
-instr
+&intr->instr
)
...>
}
@pass depends on def@
identifier def.fn;
expression shader, progress;
@@
(
-nir_shader_instructions_pass(shader, fn,
+nir_shader_intrinsics_pass(shader, fn,
...)
|
-NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
+NIR_PASS_V(shader, nir_shader_intrinsics_pass, fn,
...)
|
-NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
+NIR_PASS(progress, shader, nir_shader_intrinsics_pass, fn,
...)
)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24852 >
2023-08-24 15:48:02 +00:00
Faith Ekstrand
4695bebc79
nir: Drop nir_dest
...
Instead, we replace every use of it with nir_def. Most of this commit
was generated by sed:
sed -i -e 's/dest.ssa/def/g' src/**/*.h src/**/*.c src/**/*.cpp
A few manual fixups were required in lima and the nir_legacy code.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674 >
2023-08-14 21:22:53 +00:00
Faith Ekstrand
ed9affa02f
nir: Drop most instances of nir_ssa_dest_init()
...
Generated using the following two semantic patches:
@@
expression I, J, NC, BS;
@@
-nir_ssa_dest_init(I, &J->dest, NC, BS);
+nir_def_init(I, &J->dest.ssa, NC, BS);
@@
expression I, J, NC, BS;
@@
-nir_ssa_dest_init(I, &J->dest.dest, NC, BS);
+nir_def_init(I, &J->dest.dest.ssa, NC, BS);
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658 >
2023-08-13 17:12:52 +00:00
Alyssa Rosenzweig
09d31922de
nir: Drop "SSA" from NIR language
...
Everything is SSA now.
sed -e 's/nir_ssa_def/nir_def/g' \
-e 's/nir_ssa_undef/nir_undef/g' \
-e 's/nir_ssa_scalar/nir_scalar/g' \
-e 's/nir_src_rewrite_ssa/nir_src_rewrite/g' \
-e 's/nir_gather_ssa_types/nir_gather_types/g' \
-i $(git grep -l nir | grep -v relnotes)
git mv src/compiler/nir/nir_gather_ssa_types.c \
src/compiler/nir/nir_gather_types.c
ninja -C build/ clang-format
cd src/compiler/nir && find *.c *.h -type f -exec clang-format -i \{} \;
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24585 >
2023-08-12 16:44:41 -04:00
Konstantin Seurer
eaee792ea5
vulkan: Add a generated vk_properties struct
...
Generates a physical device properties table to avoid dealing with pNext
chains in the driver. Based on vk_features.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24575 >
2023-08-11 02:53:47 +00:00
Jesse Natalie
f0569cdba0
dzn: VK_EXT_external_memory_host
...
When ID3D12Device13 is available, we can support importing host memory.
Imported host memory can be used to back buffers and linear textures.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23886 >
2023-06-27 21:21:53 +00:00
Konstantin Seurer
afd81d5ace
microsoft: Use nir_ instead of nir_build_ helpers
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23858 >
2023-06-27 17:37:54 +00:00
Yonggang Luo
05b840521a
treewide: Replace the usage of TRUE/FALSE with true/false
...
this is a separate patch as it's won't affect the code style
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577 >
2023-06-27 18:18:28 +08:00