Saves a few CPU cycles. We expect things to explode anyway when
the app uses a non-UAV descriptor as a UAV in the shader.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Fixes a signedness comparison warning -- shouldn't be a problem as we aren't going to get images with 2m+ tiles.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
debug_marker/debug_report are both deprecated in favor of debug_utils and vkd3d was using marker in a
buggy way anways, as debug_marker requires debug_report to work, but it was
only conditionally enabled.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Otherwise, we may end up failing to allocate memory on Tier 1
hardware, and also fail to use dedicated allocations in some
cases.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
We'll need this to more accurately select the memory type for D3D12
heaps based on which resources are allowed to be placed in it.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
StartTileIndexInOverallResource can be 0 for images that have either
no mip tail or no standard mips, so we need to check the packed mip
count.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Some sparse resource may have a metadata aspect on some drivers,
which needs to be bound before the image can be used in any way.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Look up the typeless format for any given image format, then
look up the corresponding compatibility list. This also fixes
a potential issue with implicit SRGB <-> UNORM compatibility.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This now takes a sampler desc like d3d12_create_static_sampler,
and supports border colors if the provided border color matches
any of the supported Vulkan ones.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
It makes sense to separate this from d3d12_create_sampler since static
samplers and regular samplers differ in border color support.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
And zero-initialize mapped memory allocations, which seems to
fix some font corruption occationaly seen in Resident Evil 2.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
We no longer require coherent memory types, so we should
always prefer a HOST_CACHED memory type for the readback
heap as well as corresponding custom heaps.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
On NVIDIA we sometimes fail to place images on a heap because the memory
region was dedicated. Only bother trying this if heap flags only allow
buffers.
Fixes a GPU crash in The Division.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This way we don't have to change all function parameter types
every time we upgrade the interface version.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>