Jesse Natalie
5672b6cb02
dzn: Remove #if D3D12_SDK_VERSION blocks now that 610 is required
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22504 >
2023-04-14 23:59:33 +00:00
Giancarlo Devich
cc6d87b462
d3d12: Update and require DirectX-Headers 1.610.0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22454 >
2023-04-14 03:19:22 +00:00
Jesse Natalie
117ace3b14
dzn: Handle mismatches in bound descriptor set vs pipeline layout
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22420 >
2023-04-12 04:14:46 +00:00
Jesse Natalie
3cbd4fb61b
dzn: Don't enable bindless by default
...
There's bad interactions with dynamic buffers at this point:
* Perf issues due to allocating and freeing the buffer to store indices/offsets
* Large dynamic uniform buffer offsets (above 65K) cause out-of-bounds reads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371 >
2023-04-10 18:43:12 +00:00
Jesse Natalie
4d142ec594
dzn: Never set STATE_RENDER_TARGET on a compute command list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371 >
2023-04-10 18:43:12 +00:00
Jesse Natalie
5aca593262
dzn: Ignore unnormalized sampling flag if driver doesn't support it
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371 >
2023-04-10 18:43:12 +00:00
Jesse Natalie
51c96cb745
dzn: Use a linear allocator for upload data on command buffers
...
Significantly improves performance for apps that heavily use
dynamic descriptors.
Still needs caching so they can be re-used after command buffer reset.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371 >
2023-04-10 18:43:12 +00:00
Jesse Natalie
0c2848f44a
dzn: Changes to descriptor set dirty flag handling
...
The scenario of:
* App binds multiple descriptor sets
* App binds a pipeline that uses a subset of them
* App binds a pipeline that uses more of them
was broken. We were only copying the descriptors for the accessible
subset before, but then clearing all dirty bits, so simply changing
the pipeline wouldn't result in more descriptors being copied.
When running not-bindless, the right thing to do is to copy *all*
descriptors if we're copying any. When running bindless, each parameter
is set separately, and more importantly, *can't* be set on the command
list if the root signature can't access them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371 >
2023-04-10 18:43:12 +00:00
Daniel Schürmann
53eb3ad375
vulkan/pipeline_cache: add cache parameter to deserialize() function
...
This allows for secondary cache lookups during deserialization.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967 >
2023-04-10 09:14:30 +00:00
Daniel Schürmann
5daff41e27
vulkan/pipeline_cache: remove vk_device from vk_pipeline_cache_object
...
It is not necessary to store the extra pointer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967 >
2023-04-10 09:14:30 +00:00
Jesse Natalie
e4da9c2dfc
dzn: Support >2K samplers with bindless
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22346 >
2023-04-07 19:11:11 +00:00
Jesse Natalie
16e70708ba
dzn: Don't leave deleted physical devices in the instance pdev list
...
Fixes: cfa260cd ("dzn: Use common physical device list/enumeration helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22346 >
2023-04-07 19:11:11 +00:00
Jesse Natalie
71dbb3120a
dzn: Use GetResourceAllocationInfo3 for castable formats
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22346 >
2023-04-07 19:11:11 +00:00
Jesse Natalie
4fad8931f5
dzn: Clean up ABI helpers now that we require DirectX-Headers 606
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22346 >
2023-04-07 19:11:11 +00:00
Jesse Natalie
33051f1eb4
dzn: Early-out on no-op barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22346 >
2023-04-07 19:11:11 +00:00
Raun
9d38c9ca2f
dzn: Enable VK_KHR_get_memory_requirements2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22349 >
2023-04-07 15:35:10 +00:00
Raun
a9a0dc3cca
dzn: Enable VK_KHR_bind_memory2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22349 >
2023-04-07 15:35:10 +00:00
Jesse Natalie
a3e5e6ceaa
dzn: Fix bindless descriptor sets with multiple dynamic buffers that need custom descriptors
...
Fixes: 5d2b4ee4 ("dzn: Allocate descriptor sets in buffers for bindless mode")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
04fa6c715b
dzn: Batch command lists together
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
e16b55d861
dzn: Don't do initial-layout barriers for simultaneous-access resources
...
Fixes: 4daeac01 ("dzn: Enhanced barriers fixes/workarounds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
023f7b26dc
dzn: Attempt to force depth write states for depth access in LAYOUT_GENERIC
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
c914d53d13
dzn: Ensure buffer offsets are aligned
...
If the app passes us unaligned buffer offsets, we need to align them
down to the nearest aligned offset, and then put the difference into
the descriptor set buffer.
Fixes: 8bd5fbf8 ("dzn: Bind buffers for bindless descriptor sets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
eaa8c8097c
dzn: Don't use write-combine memory for cache-coherent UMA
...
Cache coherent UMA implies that the GPU is reading data through the
CPU caches. Using write-combined CPU pages for such a system would
be bad, since the GPU would then be reading uncached data. One
example of such a system is WARP. This significantly improves WARP's
performance for some apps (including the CTS).
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
3db019a816
dzn: Ensure pipeline variants are used for dynamic stencil masks
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
460ee81913
dzn: Align descriptor sets in the bindless buffer
...
Fixes: 5d2b4ee4 ("dzn: Allocate descriptor sets in buffers for bindless mode")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
84c0f40490
dzn: Report some more caps correctly that are supported
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
a348b49901
dzn: Raise max number of descriptor sets to 8
...
DOOM Eternal just assumes you support at least 5, which caused corruption
due to overrunning arrays. We can just bump this up. 8 should work with
and without bindless.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
f2a5a03d3b
dzn: Fix SRV barrier state on compute command lists
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
fb5abb956d
dzn: Add a driconf option for enabling subgroup ops in VS/GS
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Jesse Natalie
89879d8fe2
dzn: Add a driconf entry for enabling 8bit loads and stores
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225 >
2023-04-06 22:08:28 +00:00
Pedro J. Estébanez
e59fdcb93c
spirv2dxil: Split read-only image as SRV logic into declared and inferred
...
Fixes: e0a090ad ("spirv2dxil: Only lower readonly images to SRVs when the option is set")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22289 >
2023-04-04 22:50:05 +00:00
Jesse Natalie
9663546cf4
dzn: Claim fillModeNonSolid
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22277 >
2023-04-04 21:48:19 +00:00
Jesse Natalie
69a9a3ea3c
dzn: Handle polygon point mode
...
Note: The meaning of clockwise vs counter-clockwise changes after the
yz flip, therefore the determination of winding needs to be done before
the yz flip logic. Therefore the yz flip is moved to the GS and applied
as a lowering on top of the base GS.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22277 >
2023-04-04 21:48:19 +00:00
Jesse Natalie
bcf50b7532
dzn: Add a helper to generate triangle->point GS
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22277 >
2023-04-04 21:48:19 +00:00
Jesse Natalie
4d48fc6fe5
dzn: Use mesa_loge for DXIL validation errors
...
This allows them to be printed to OutputDebugString
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
7750e23c7f
dzn: Enable variable size bindings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
19818ecc37
dzn: Support descriptor indexing via bindless
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
c93dda6bee
dzn: Add a debug option for enabling bindless mode
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
ebc8a86df1
dzn: Apply bindless lowering when compiling pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
35a789dbb7
dzn: Only bind descriptor sets up to the used amount of the current layout
...
Prevents setting a root SRV into a slot that's not declared as an SRV
in the root signature if a set is bound into a higher slot from a previous
draw/dispatch op.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
a227ef2983
dzn: Ensure root signatures are re-bound after a meta op
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
7edff267cc
dzn: When binding a bindless root signature, bind descriptor heaps first
...
The D3D spec says it must be so, and not doing this causes problems
on some hardware.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
8d52a480fe
dzn: Add a binding classification in the pipeline layout remapping
...
This is needed so that we can handle two special cases:
* Dynamic buffer data is allocated out of a command-buffer-owned buffer,
rather than a descriptor-set-owned buffer, so the remapping puts them
in their own register space.
* Static samplers should be left alone and not converted to bindless.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
8bd5fbf8ed
dzn: Bind buffers for bindless descriptor sets
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
5f61e66024
dzn: Use separate dirty bits for descriptor sets/dynamic buffers
...
We'll be able to take advantage of this granularity in bindless mode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
1846426195
dzn: Don't dirty bindings if root signature doesn't change
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
5d2b4ee4f4
dzn: Allocate descriptor sets in buffers for bindless mode
...
Modify the root signature stored in the pipeline layout too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
a1881bc7ee
dzn: Delete unused function
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
ac0b0731ea
dzn: Remove defragmenting of descriptor pools
...
Rather than trying to perfectly defrag, let's just allow re-use.
When a set is allocated for the first time, it locks in its range of
the heap that it'll use. If the last set in the heap is used, then
those descriptors go back to being free, but if a set in the middle
of the heap is freed, those descriptors remain assigned to that set.
A later allocation attempt can reclaim them, as long as the new set
fits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00
Jesse Natalie
079f3deafb
dzn: When bindless, only allocate one descriptor per layout entry
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913 >
2023-03-23 21:48:44 +00:00