Just use VK_NULL_HANDLE. We rely on the disk cache to exist anyways
here. We never serialize the global pipeline cache, so it might just
confuse drivers into disable disk cache if anything.
Also reduce memory bloat.
Also gets rid of very old NV driver workaround where we forced global
pipeline cache.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
We rely on zerovram behavior in drivers. Opt-in to this path where we
know implementation does what we want (backed up by testing).
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
The suballocation test should also try to allocate >= 2 MiB buffers so
we can verify VRAM clear behavior for dedicated allocations as well.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Transfer batches buffers CopyTextureRegion calls for batching.
The flushes needs to happen in a few places:
1. ResourceBarrier: This is where the transition from COPY_DEST to other
might happen, at which point the writes must be visible. This might
also transition away from COPY_SRC which invalidates the
precondition.
2. Copy operations. Copies to the same resource are implicitly ordered.
3. Draws and dispatches. These are not strictly necessary, but we don't
want too much command reordering so flushing here seems good.
4. Close. So that we don't throw commands into the void.
Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
A parameter preparation stage, a pre-execution barrier stage, then finally
the execution and post-execution barrier stage.
Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
5.3.9.5 in D3D11 spec explicit outlines when we can
cast to R32{U,I,F}. The D3D12 validation layers
seem to have missed this.
Fixes assertions in RADV when running test under debug.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Gets better codegen, since compiler no longer has to assume
that negative indices can be generated, which means full 64-bit sign
extension and addressing math (slow).
Based on experiments, no native driver lets -1 indices work,
so it's safe to make the u32 assumption.
See test_root_descriptor_offset_sign as a justification for this change.
Also, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/6562
for discussion on InBounds.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
For now, just keep the NV path as well. It's the exact same extension
basically as the KHR one.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
If we don't get a swapchain on first frame for whatever reason, defer
creating the descriptors.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
If we fail to present after a swapchain recreation, force a SURFACE_LOST
scenario and try again later when things hopefully stabilize.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
It just called create_vulkan_swapchain anyways.
Also, add in extra parameter to support temporary user buffer fallbacks.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Refactor destroy_buffers to destroy_resources as it's more obvious what
it's doing that way.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Some dynamic state is at risk of being spammed with same arguments many
times. For the dynamic state that is trivial to check, do so.
Ghostwire: Tokyo has been observed to spam the same OMSetStencilRef
value causing some context rolls, also RSSetShadingRate has been set
redundantly.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes validation error on Intel where we are trying to create
CONCURRENT family with {0, -1}.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>