All vkDestroy* functions are defined to perform no operation when passed
a null handle. vkd3d_free should follow regular free semantics.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Removes some unused counters and repurposes the existing ones to
differentiate between bindings (i.e. the array passed to the shader
compiler) and packed descriptors.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Fixes an issue where push constants can be invalidated by
shader-based clear/copy commands.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Uses one push constant range with VK_SHADER_STAGE_ALL. This
will allow us to easily add descriptor table offsets as push
constants.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This modifier can be applied to both destination and source
operands, so for the sake of simplicity and to avoid having
to pass down modifier information explicitly, just store this
state with the register.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
An upcoming change to the binding model will use these to
initialize descriptors that have the wrong resource type
bound, or were left uninitialized by the application.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Otherwise we might run into undefined behaviour if an app
tries to read a NULL UAV or perform atomic operations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
The primary purpose of this function was to invalidate UAV
counters upon binding a pipeline. This is no longer an issue
and we don't have any other per-pipeline bindings, so this
function can be dropped.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Makes UAV-related code more readable and supports up to 64
UAV bindings, which is enough to support resource binding
tier 2.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This needs a major rework as the current implementation has bugs,
is hard to reason about, and very hard to maintain as we're about
to make major changes to the binding model as a whole.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
We're going to need more capabilities outside the 0-63 range
going forward, so a bitmask doesn't cut it and adding extra
struct members for each capability seems excessive.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Resource index is found in idx[0] in SM 5.0, but idx[1] when using SM
5.1, and register space is encoded separately. An rb_tree keeps track of
the internal resource index idx[0] and can map that to space/binding as
required when emitting SPIR-V.
For this to work, we must also make UAV counters register space aware.
In earlier implementation, UAV counter mask was assumed to correlate 1:1
with register_index, which breaks on SM 5.1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
On Windows, it is not ideal to rely on Vulkan being available as a
linkable library as a full install of the Vulkan SDK must be present and
set up, be friendly and load Vulkan dynamically instead.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cannot disable VK_EXT_descriptor_indexing as we relied on internal
behavior in RADV related to global_bo_list. Implementing bindless
properly in vkd3d will solve this correctly.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>