Commit Graph

404 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen 8010c26ec4 vkd3d: Do not attempt to enable primitive restart for non-strip topology.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-23 12:56:16 +01:00
Philip Rebohle 95c1faeeb9 vkd3d: Add some missing bindless feature checks.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 14:35:35 +01:00
Philip Rebohle 2ffb5396cc vkd3d: Use storage buffers for bindless CBV if supported.
Used as a fallback for older Nvidia generations which do not
support bindless uniform buffers.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 14:35:35 +01:00
Philip Rebohle fda155b965 vkd3d: Adjust descriptor types if CBV_AS_SSBO is set.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 14:35:35 +01:00
Philip Rebohle 3709ae1dd8 vkd3d: Introduce VKD3D_BINDLESS_CBV_AS_SSBO flag.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 14:35:35 +01:00
Hans-Kristian Arntzen 71d8f63356 vkd3d: Split descriptor pool allocation based on usage.
Logically split up descriptor pool allocation in three types:
- STATIC: Root descriptors and internal allocation.
- VOLATILE: For packed descriptor set which comes from heaps.
- IMMUTABLE_SAMPLER: For immutable samplers. This should be removed once
  we start allocating sampler sets at sampler creation time.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-18 14:29:03 +01:00
Philip Rebohle 87e9bb3e82 vkd3d: Use inline uniform block for push constant data if necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle 2688219573 vkd3d: Add inline uniform block to root descriptor set layout if desired.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle e899b96c10 vkd3d: Introduce root signature flag to determine push descriptor usage.
For now this is enbaled based on device capabilities, but future changes
may require this to be disabled for certain root signatures.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle d515e3efa7 vkd3d: Rename flags -> d3d12_flags in d3d12_root_signature.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle be5cdd2e55 vkd3d-shader: Optionally declare push constant buffer as UBO.
Will be used on implementations that do not support enough
push constants to hold all root signature data.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle b495e94062 vkd3d: Enable bindless constant buffer views.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-12 11:32:41 +01:00
Hans-Kristian Arntzen fee9b2bb05 vkd3d: Implement RS 1.0 volatile for packed descriptor set.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-11 12:20:00 +01:00
Philip Rebohle 5f2d511a96 vkd3d: Store whether a descriptor table has packed descriptors.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-11 10:47:58 +01:00
Philip Rebohle fe2a4c62c9 vkd3d: Enable bindless samplers and SRVs if supported by the device.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 15:25:54 +01:00
Philip Rebohle 4e95975182 vkd3d: Add bindless descriptor set layouts to pipeline layouts.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 15:25:54 +01:00
Philip Rebohle e68aa6c85c vkd3d: Pass descriptor table info to shader compiler.
Adds one push constant per descriptor table to the push constant range.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 15:25:54 +01:00
Philip Rebohle a30f511f9a vkd3d: Declare descriptor ranges as bindless if supported.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 15:25:54 +01:00
Philip Rebohle 83674a8a61 vkd3d: Correctly handle bindless ranges when counting descriptors.
We still need to pass binding info for each range to the shader compiler,
but bindless ranges will not contribute to the packed descriptor count.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 15:25:54 +01:00
Philip Rebohle a1e6a1510f vkd3d: Create descriptor pool and sets for descriptor heaps.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 14:30:28 +01:00
Philip Rebohle 01cbbaea81 vkd3d: Create bindless descriptor set layouts.
Don't enable any bindless features for now so that we don't
introduce regressions as features get added.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 14:07:51 +01:00
Philip Rebohle c4a173ddca vkd3d: Separate UAV counter bindings from UAV buffer/image bindings.
Now that the binding code no longer makes any wild assumptions about
the exact binding layout, we can safely do this. Will make implementing
bindless a bit easier.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 14:07:51 +01:00
Philip Rebohle 6e15ad20b4 vkd3d: Rework descriptor table binding.
Uses the new data structures to iterate over descriptor
tables and populate the packed descriptor set.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 14:07:51 +01:00
Philip Rebohle 4979953ff9 vkd3d: Rework descriptor tables.
Further changes will require a rework of how resource binding
works inside a command list, so for now, this is just a cleanup
that also removes some old code that is no longer needed.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 13:11:10 +01:00
Philip Rebohle 28bf2eec3e vkd3d: Rework static samplers.
Static samplers are embedded in the root signature, so we can create
a separate descriptor set layout and descriptor set which we only
need to rebind when the root signature itself changes.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 13:11:10 +01:00
Philip Rebohle 82bf3e810b vkd3d: Rework root descriptors.
Streamlines descriptor set layout creation for root descriptors.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 12:19:07 +01:00
Philip Rebohle a1ade15885 vkd3d: Rename and repurpose vkd3d_descriptor_set_context members.
- descriptor_index is the index of the descriptor within the packed
  descriptor set or root descriptor set. Currently unused.
- binding_index should now index into the root_signature->bindings array.
- vk_set and vk_binding refer to the Vulkan descriptor set index and
  binding number of packed descriptors or root descriptors.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:59:17 +01:00
Philip Rebohle 189bcd39af vkd3d: Store index of root descriptor set in root signature.
This allows us to put root descriptors into a set other than 0.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle 3f125ac919 vkd3d: Temporarily require VK_KHR_push_descriptor.
Allows us to more easily refactor root signature-related code
without having to worry about root descriptors for now.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle 0d071c9c37 vkd3d: Rename root signature descriptor set layout members.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle 287f4e525b vkd3d: Remove some useless null pointer checks in d3d12_root_signature_cleanup.
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>
2020-03-10 11:44:45 +01:00
Philip Rebohle 5e8821d561 vkd3d: Clean up root signature descriptor counting.
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>
2020-03-10 11:44:45 +01:00
Philip Rebohle 7c276f5e82 vkd3d: Rework root constant updates.
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>
2020-03-10 11:44:45 +01:00
Philip Rebohle 0eed8a1080 vkd3d: Rework root constants.
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>
2020-03-10 11:44:45 +01:00
Philip Rebohle ade87e6c47 vkd3d-shader: Add push constants for descriptor table offsets.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle 34e128897d vkd3d-shader: Pass more info from root signature to shader compiler.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle f3d89a548a vkd3d: Reintroduce UAV counters.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Philip Rebohle 324da790db vkd3d-shader: Simplify UAV counter interface declaration.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Philip Rebohle 0dab14ed22 vkd3d: Temporarily drop UAV counter support.
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>
2020-03-02 12:16:30 +01:00
Hans-Kristian Arntzen 1da8ee9f86 vkd3d: Remove obsolete FIXME for immutable samplers with register space.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:05 +01:00
Philip Rebohle c4c9fa82b0 vkd3d-shader: Drop support for combined resource samplers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-26 10:18:30 +01:00
Hans-Kristian Arntzen 93e4b6ff9b vkd3d: Deal correctly with SM 5.1 register spaces.
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>
2020-02-24 12:32:29 +01:00
Philip Rebohle 126a789019 vkd3d: Implement d3d12_command_list_ClearUnorderedAccessViewFloat().
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 16:06:59 +01:00
Philip Rebohle 8cb42d6971 vkd3d: Keep active bindings after changing root signature.
Shadow of the Tomb Raider does not re-bind all descriptor tables after
setting a new root signature if tessellation is enabled, which causes
some descriptors to be left undefined.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:24:20 +01:00
Hans-Kristian Arntzen 0282b2643c vkd3d: Fix MSVC build of state.c.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 19:15:56 +02:00
Józef Kucia 865fbea532 vkd3d: Remove unused d3d12_root_signature_init_descriptor_pool_size().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-06 17:05:12 +02:00
Józef Kucia 8df3bfc5c2 vkd3d: Prepend pNext chain structures.
Order of structures doesn't matter so we can simply prepend instead of
apending.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-06 17:05:07 +02:00
Józef Kucia 56d260b40e vkd3d: Use vk_append_struct() in more places.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:24:42 +02:00
Józef Kucia ee7d24a213 vkd3d: Add support for VK_EXT_shader_demote_to_helper_invocation.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:24:38 +02:00
Józef Kucia 077e8b1459 vkd3d-shader: Add support for SPV_EXT_demote_to_helper_invocation.
Requires SPIRV-Headers commit dcce859e34cf0c23625ec75ac44df750aa2f4d70.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:24:34 +02:00
Józef Kucia a8c0fbaa6d vkd3d: Use FIXME_ONCE() for AntialiasedLineEnable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-13 20:56:40 +02:00
Józef Kucia 285a19408f vkd3d: Introduce FIXME_ONCE().
The debug log level is demoted to WARN after the FIXME is printed once.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 22:37:44 +02:00
Józef Kucia 895aaa461b vkd3d: Clarify DSV attachment mask handling.
It isn't immediately obvious what "1u << graphics->rt_count" means.
Use dsv_attachment_mask() helper instead.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 22:37:37 +02:00
Józef Kucia afe7259242 vkd3d: Introduce helper functions to call ID3D12Device methods.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:24:40 +02:00
Józef Kucia 3e99853297 vkd3d: Always return render pass from d3d12_pipeline_state_get_or_create_pipeline().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 16:25:09 +02:00
Józef Kucia e7e0f4180d vkd3d: Simplify checking for render pass compatibility.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:41:15 +02:00
Józef Kucia ee1b8cc511 vkd3d: Defer creating render pass only when depth-stencil tests are enabled.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:41:06 +02:00
Józef Kucia f629cdecc1 vkd3d: Disable unncessary depth tests.
Allows us to create the render pass while creating the pipeline state.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:41:04 +02:00
Józef Kucia 26e6957875 vkd3d: Refactor render pass attachments.
Use the last attachment for depth-stencil instead of the first.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:41:02 +02:00
Józef Kucia 92d88e2903 vkd3d: Fix draw calls without depth-stencil view.
Fixes a regression introduced by
9eba55403d.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:40:56 +02:00
Józef Kucia 9eba55403d vkd3d: Do not disable depth-stencil tests for PSOs with invalid DSV format.
This is invalid usage according to the D3D12 validation layer. However,
Shadow of the Tomb Raider uses PSOs with DSVFormat equal to
DXGI_FORMAT_UNKNOWN and enabled depth-stencil tests. Moreover, the test
in the next commit passes on Windows with AMD, Intel and Nvidia GPUs.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:28:56 +02:00
Józef Kucia 99c3e383dd vkd3d: Introduce helper to create render pass for pipeline state.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:28:54 +02:00
Józef Kucia 8e16831549 vkd3d: Accept DXGI_FORMAT_UNKNOWN for pipeline RTV formats.
A NULL RTV is expected to be used when RTVFormat is DXGI_FORMAT_UNKNOWN.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 12:47:37 +02:00
Józef Kucia 9536f10383 vkd3d: Pass device to vkd3d_get_format().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 08:21:02 -05:00
Józef Kucia 8a23ff1376 vkd3d: Allow 0 vertex stride.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 15:29:50 -05:00
Józef Kucia 242e52ac59 vkd3d: Simplify d3d12_pipeline_state_is_render_pass_compatible().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 09:25:37 +02:00
Józef Kucia 5da59641b0 vkd3d: Share Vulkan render pass objects between D3D12 pipeline states.
For example, World of Warcraft creates 28 render passes for pipeline
state objects instead of 600+ render passes. Other games appears to use
similarly low number of render passes, e.g. 8, 17, 26, 60.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 09:25:34 +02:00
Józef Kucia 90bd84bf83 vkd3d: Pass sample count to shader compiler.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 16:37:25 +02:00
Józef Kucia f510e93948 vkd3d-shader: Implement sampleinfo for rasterizer.
Also adds initial infrastructure for more flexible shader parameters.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 16:37:18 +02:00
Józef Kucia aa2d00929e vkd3d: Prefer versioned root signature structures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:20:21 +02:00
Józef Kucia 374bcd276e vkd3d-shader: Remove versioned_ prefix from root signature functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:20:18 +02:00
Józef Kucia f300781c79 vkd3d: Prefer vkd3d_shader_parse_versioned_root_signature().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 16:24:07 +02:00
Józef Kucia a95c9f8ad8 vkd3d: Add support for VK_EXT_depth_clip_enable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 17:25:31 +02:00
Józef Kucia 41274e6285 vkd3d: Drop support for dummy sampler.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 17:25:23 +02:00
Józef Kucia 92185ce594 vkd3d: Fix formatting in is_dual_source_blending().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 18:33:38 +01:00
Józef Kucia 1164de705e vkd3d: Do not enable depth bias unconditionally.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 18:33:36 +01:00
Józef Kucia 257ac5c3a1 vkd3d: Set object names for Vulkan compute pipelines.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 19:26:48 +01:00
Józef Kucia 6a3c75d0d1 vkd3d: Compile pipelines with tessellation state create info.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 19:26:44 +01:00
Józef Kucia 1ae1f831f6 vkd3d-shader: Move VKD3D_SHADER_DUMP_PATH implementation from libvkd3d.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:05:51 +01:00
Zhiyi Zhang 252af95ba0 vkd3d: Implement d3d12_root_signature_SetName().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:05:43 +01:00
Zhiyi Zhang 225242c0b1 vkd3d: Implement d3d12_pipeline_state_SetName().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:05:41 +01:00
Józef Kucia d74133fda5 vkd3d: Fix assert() condition for sample mask array size.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 18:59:14 +01:00
Józef Kucia 639693de86 vkd3d: Do not ignore SampleMask in D3D12_GRAPHICS_PIPELINE_STATE_DESC.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 17:04:02 +01:00
Józef Kucia 4c0692b2ef vkd3d-shader: Rename vkd3d_shader_interface to vkd3d_shader_interface_info.
For consistency with other vkd3d and vkd3d-shader structures.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-17 19:44:05 +01:00
Józef Kucia 1a05563fc7 vkd3d: Require D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT for input layout.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-17 19:44:03 +01:00
Józef Kucia 15713840b4 vkd3d: Require D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT for stream output.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-17 19:44:01 +01:00
Józef Kucia 1e4f8e39c9 vkd3d: Enable transform feedback for pipeline states with stream output.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 20:31:17 +01:00
Józef Kucia 1aae46fb2f vkd3d: Pass transform feedback info to vkd3d-shader.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 20:31:15 +01:00
Józef Kucia 61dd136cab vkd3d: Implement RasterizedStream.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 20:31:08 +01:00
Józef Kucia c509e6e83f vkd3d: Add FIXME() for sample mask.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-11 19:31:37 +01:00
Józef Kucia 2629d9703f vkd3d: Protect private data with mutex.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-10 10:03:53 -06:00
Józef Kucia b8fce1ac36 vkd3d: Implement private data for pipeline states.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-04 17:05:33 +01:00
Józef Kucia 751d79a68f vkd3d: Implement private data for root signatures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-04 17:05:28 +01:00
Józef Kucia 5bb045c8f9 vkd3d: Validate RTV format for inactive render targets in pipeline state desc.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-17 19:17:14 +01:00
Józef Kucia c93d9bc714 vkd3d: Implement dual source blending.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-17 19:17:11 +01:00
Józef Kucia a1ad45be69 vkd3d: Add FIXME() for unsupported strip cut values.
In Vulkan, the strip cut value is derived from the current index buffer
format. We could recompile the pipeline to handle more cases.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:22:48 +01:00
Józef Kucia afb648d19d vkd3d: Implement primitive restart.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:22:45 +01:00
Józef Kucia 09f667ce4e vkd3d: Add FIXME() for invalid depth/stencil formats.
Needs more tests.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 22:05:24 +01:00
Józef Kucia e91bfb882d vkd3d: Disable depth/stencil tests for DXGI_FORMAT_UNKNOWN.
Needs more tests.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 22:05:17 +01:00
Józef Kucia 4486736e87 vkd3d: Improve invalid format messages.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 21:23:45 +01:00
Józef Kucia 7decb65f54 vkd3d-shader: Implement shader visibility for UAV counters.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 18:33:37 +01:00
Józef Kucia a39d2aa3a8 vkd3d: Allow depth rendering without pixel shader.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 18:33:34 +01:00
Józef Kucia fa0f6f584a vkd3d: Enable rasterization discard if possible.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 18:33:33 +01:00
Józef Kucia f97b745ae7 vkd3d-shader: Add structure type fields to public API structures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 18:21:59 +01:00
Józef Kucia ae84b5210e vkd3d-shader: Introduce vkd3d_shader_binding_flags.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 17:08:43 +01:00
Józef Kucia ebde6bd229 vkd3d: Implement instance data step rate.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 14:54:52 +02:00
Józef Kucia 5d28817164 vkd3d: Set the numer of samples for graphics pipelines.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 13:58:32 +02:00
Józef Kucia 8f07e14711 vkd3d: Store compiled Vulkan pipelines in d3d12_graphics_pipeline_state.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 17:00:51 +02:00
Józef Kucia cfef906696 vkd3d: Make pipeline state responsible for creating Vulkan pipelines.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 17:00:50 +02:00
Józef Kucia 11de335abd vkd3d-shader: Add support for combined samplers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 10:57:25 +02:00
Józef Kucia 2f43965c2c vkd3d-shader: Add OpenGL SPIR-V target environment.
More changes are needed for full support.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-11 18:37:36 +02:00
Józef Kucia 07d115b1d4 vkd3d: Fix race condition while dumping DXBC shaders.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 22:25:04 +02:00
Józef Kucia 11c00a157c vkd3d: Implement simple pipeline cache.
Ideally, we would like to introduce a Vulkan extension to make vertex
buffer strides and primitive topology dynamic in Vulkan.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-12 23:16:21 +02:00
Józef Kucia e43141b68e vkd3d: Add FIXME() for ignored SampleDesc.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 23:17:34 +02:00
Józef Kucia bdc848b27a vkd3d: Validate D3D12_BLEND_DESC.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 20:32:56 +02:00
Józef Kucia ffebe4524d vkd3d: Avoid invalidating current framebuffer needlessly.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:02:30 +02:00
Józef Kucia f0c27af357 libs/vkd3d: Fix return type of d3d12_root_signature_info_count_descriptors() (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:02:03 +02:00
Józef Kucia b7d2278f57 libs/vkd3d: Validate PrimitiveTopologyType for PSO with tessellation shaders.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-18 17:52:39 +02:00
Józef Kucia 7892a1e938 libs/vkd3d: Return E_INVALIDARG for invalid pipeline state desc.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-18 17:52:37 +02:00
Józef Kucia d266a5f7d0 libs/vkd3d: Process shader stages according to pipeline order.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-18 17:52:35 +02:00
Józef Kucia b5d1dbd182 libs/vkd3d: Rename default sampler to dummy sampler.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-24 23:29:36 +02:00
Józef Kucia a87b3f3fb2 libs/vkd3d-shader: Rename default sampler to dummy sampler.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-24 23:29:32 +02:00
Józef Kucia 78c952ee5f libs/vkd3d: Fix rendering to DXGI_FORMAT_A8_UNORM.
In Direct3D alpha is taken from the .r component.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-24 23:29:28 +02:00
Józef Kucia 40ee9fa0e9 libs/vkd3d-shader: Implement swizzling for shader outputs.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-24 23:29:24 +02:00
Józef Kucia 3198cab3ed libs/vkd3d: Process render target formats before shaders.
We may need to swizzle components in pixel shader based on render target
formats because Vulkan doesn't support swizzles for framebuffer
attachment image views.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-24 23:29:13 +02:00
Józef Kucia 8b8128b055 libs/vkd3d: Fix memory leak in d3d12_pipeline_state_init_compute_uav_counters().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-13 19:08:10 +02:00
Józef Kucia 844c83a837 libs/vkd3d-shader: Avoid Windows data types in public API.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 20:00:35 +01:00
Józef Kucia fddf86e6ea libs/vkd3d-shader: Remove dependency on D3D12 headers.
We would like to allow building libvkd3d-shader as a standalone library
without our Direct3D translation layers.

In the long term, it should be possible to build and use libvkd3d-shader
without Win32 data types, Vulkan headers and libs.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 20:00:31 +01:00
Józef Kucia 7e5dd39f5f libs/vkd3d: Prefer VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL.
Use VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL if depth/stencil
writes are disabled.
2017-10-30 14:04:53 +01:00
Józef Kucia 2b21fbf6b8 libs/vkd3d: Add VKD3D_SHADER_DUMP_PATH environment variable for dumping shaders.
A similar functionality was helpful numerous number of times when
developing libvkd3d-shader.
2017-10-24 15:22:01 +02:00
Józef Kucia f4cfebcd7e libs/vkd3d: Remove hack for creating root signatures from description. 2017-10-10 16:02:09 +02:00
Józef Kucia 5b5cffcf84 libs/vkd3d: Implement creating root signature from bytecode. 2017-10-10 16:02:09 +02:00
Józef Kucia 5a020d6673 libs/vkd3d-shader: Implement shader visibility for descriptors. 2017-09-22 16:42:07 +02:00
Józef Kucia 8cb004bdc4 libs/vkd3d: Create single default sampler per device. 2017-09-21 15:12:13 +02:00
Józef Kucia cfa827b2f8 libs/vkd3d: Call compute_input_layout_offsets() unconditionally. 2017-09-21 15:12:13 +02:00
Józef Kucia acfd64c20e libs/vkd3d: Avoid copying descriptors for dirty root descriptor tables. 2017-09-18 15:40:42 +02:00
Józef Kucia 2425e2939a libs/vkd3d: Match input layout elements with vertex shader inputs. 2017-09-11 22:35:16 +02:00
Józef Kucia cd99601b3c libs/vkd3d: Implement offset computation for D3D12_APPEND_ALIGNED_ELEMENT. 2017-09-11 22:35:16 +02:00
Józef Kucia 8e802ed0af libs/vkd3d: Update descriptor table ranges only with matching descriptor types. 2017-09-11 22:35:16 +02:00
Józef Kucia 32966338df libs/vkd3d: Get rid of UAV counter count from d3d12_pipeline_state. 2017-09-08 15:30:48 +02:00
Józef Kucia 9afaed918d libs/vkd3d: Bind descriptor set for UAV counters. 2017-09-08 15:04:30 +02:00
Józef Kucia 0d28036d2a libs/vkd3d: Add UAV counter support for compute pipelines.
UAV counter descriptors are stored in a separate VkDescriptorSet.
A VkPipelineLayout created for compute pipeline is compatible for all
other descriptor sets with the VkPipelineLayout created for the root
signature. This ensures that only UAV counter bindings in the last
descriptor set may be disturbed when switching between pipelines with
compatible root signatures.

The implementation of vkd3d_popcount() is based on
https://graphics.stanford.edu/~seander/bithacks.html
2017-09-08 15:04:30 +02:00
Józef Kucia 7416c83ae2 libs/vkd3d-shader: Rename vkd3d_descriptor_type to vkd3d_shader_descriptor_type. 2017-09-07 17:15:54 +02:00
Józef Kucia efdf2ec691 libs/vkd3d-shader: Rename vkd3d_shader_push_constant to vkd3d_shader_push_constant_buffer.
This should be clearer. Multiple constant buffers can be assigned to
a single push constant range.
2017-09-07 17:15:54 +02:00
Józef Kucia bd0c886281 libs/vkd3d: Store push constant ranges in root signatures.
In prep for UAV counters support.
2017-09-07 17:15:54 +02:00
Józef Kucia ce8a0290b4 libs/vkd3d: Factor out vkd3d_create_pipeline_layout() function. 2017-09-07 17:15:54 +02:00
Józef Kucia 22b019137b libs/vkd3d: Factor out vkd3d_create_descriptor_set_layout() function. 2017-09-07 17:15:53 +02:00
Józef Kucia f587670445 libs/vkd3d: Drop support for SPIR-V shaders. 2017-09-07 17:15:53 +02:00
Józef Kucia 9eee65c3ab libs/vkd3d: Validate root signature size. 2017-09-05 11:53:55 +02:00
Józef Kucia 62bd4e6e63 libs/vkd3d: Add support for OffsetInDescriptorsFromTableStart. 2017-08-31 11:21:34 +02:00
Henri Verbeet 3019a3e8f1 libs/vkd3d: Support both native and Win32 wchar_t. 2017-08-29 16:36:05 +02:00
Józef Kucia 92bb7969a5 libs/vkd3d: Create push descriptor set only if needed. 2017-08-18 17:08:56 +02:00
Józef Kucia 1d5b8b7d32 libs/vkd3d: Implement depth/stencil resource views. 2017-08-16 17:38:33 +02:00
Józef Kucia f5515c46df libs/vkd3d: Create default sampler for each root signature.
We need a sampler for SpvOpImageFetch aka texelFetch().
2017-08-16 13:11:52 +02:00
Józef Kucia e3d6bac31b libs/vkd3d-shader: Introduce vkd3d_shader_interface structure. 2017-08-16 13:11:52 +02:00
Józef Kucia 32e69fa945 libs/vkd3d: Use KHR_push_descriptor for root descriptors.
Thanks to KHR_push_descriptor, we do not have to allocate descriptor
sets for subsequent root descriptor parameters updates.
2017-08-11 13:58:04 +02:00
Józef Kucia 5a9b625522 libs/vkd3d: Factor out d3d12_root_signature_init_root_descriptor_tables() function. 2017-08-11 13:58:04 +02:00
Józef Kucia cc0cfb5a81 libs/vkd3d: Factor out d3d12_root_signature_init_root_descriptors() function.
Root descriptors are going to be assigned to a separate descriptor set
in order to be used with VK_KHR_push_descriptor.
2017-08-11 13:58:04 +02:00
Józef Kucia e3cdf5226f libs/vkd3d: Factor out d3d12_root_signature_init_static_samplers() function. 2017-08-11 13:58:04 +02:00
Józef Kucia 9c2b126f38 libs/vkd3d: Factor out d3d12_root_signature_init_descriptor_pool_size(). 2017-08-11 13:58:04 +02:00
Józef Kucia 69745d1c08 libs/vkd3d: Fix mapping for SRV/UAV root descriptors. 2017-08-11 13:58:04 +02:00
Józef Kucia b0e47baebf libs/vkd3d: Implement d3d12_command_list_Set{Compute,Graphics}RootUnorderedAccessView(). 2017-08-09 18:44:16 +02:00
Józef Kucia 2665cbe522 libs/vkd3d: Duplicate Vulkan descriptors for SRVs and UAVs.
Vulkan has different descriptor types for buffers and textures.
Therefore, we do not know the exact Vulkan descriptor type for D3D12 SRV
and UAV descriptors up front. This information can be extracted from
shaders when creating PSOs but creating incompatible Vulkan descriptor
set layouts for PSOs with the same root signature would introduce a lot
of complexity.

In order to preserve compatibility between resource bindings for PSOs
with the same root signature we duplicate Vulkan descriptors for SRVs
and UAVs (a buffer view and an image view descriptor). This strategy may
be reasonable for small root signatures.
2017-08-08 17:09:35 +02:00
Józef Kucia 1b02322c1d libs/vkd3d: Overallocate descriptors for SRV and UAV descriptor ranges. 2017-08-08 17:09:35 +02:00
Józef Kucia 3eb5e59e37 libs/vkd3d: Count buffer SRVs and UAVs separately.
SRV and UAV root parameters are buffer views.
2017-08-08 17:09:35 +02:00
Józef Kucia cdc5cd499f libs/vkd3d: Avoid potential double free. 2017-08-07 14:53:51 +02:00
Józef Kucia fa0a2eab21 libs/vkd3d: Store Vulkan bindings for descriptor table root parameters in root signature. 2017-08-04 17:06:33 +02:00
Józef Kucia 573460550e libs/vkd3d: Do not assume CBV root parameter index is equal to Vulkan descriptor binding. 2017-08-02 15:30:15 +02:00
Józef Kucia cd75aab7ba libs/vkd3d: Factor out d3d12_root_signature_init_push_constants() helper function. 2017-08-01 10:51:45 +02:00
Józef Kucia 40cb21353e libs/vkd3d: Extract descriptors counting to helper function. 2017-08-01 10:51:45 +02:00
Józef Kucia 3e91bc7c2d libs/vkd3d: Fix push constant ranges allocation.
Any two push constant ranges must not include the same stage.
2017-08-01 10:51:45 +02:00
Józef Kucia d75966ab9e libs/vkd3d: Assign non-overlapping push constant ranges for root constants. 2017-08-01 10:51:45 +02:00
Józef Kucia e074c30dc7 libs/vkd3d: Pass push constants mapping to shader compiler. 2017-07-28 10:19:37 +02:00
Józef Kucia 72f723522e libs/vkd3d: Implement d3d12_command_list_SetComputeRoot32BitConstant(). 2017-07-28 10:19:37 +02:00
Józef Kucia 92fcb9ffa2 libs/vkd3d-shader: Add support for push constants. 2017-07-27 15:24:38 +02:00
Józef Kucia bb80c759fc libs/vkd3d: Introduce d3d12_root_signature_cleanup() helper function.
Reduces code duplication.
2017-07-27 14:19:41 +02:00
Józef Kucia e3d3819789 libs/vkd3d: Fix copy-paste error in d3d12_root_signature_init(). 2017-07-26 16:09:40 +02:00
Józef Kucia 1589ce7682 libs/vkd3d: Fix Vulkan bindings assignment.
Fixes 6d569fcbc6,
2017-07-26 14:50:39 +02:00
Józef Kucia 6d569fcbc6 libs/vkd3d: Assign consecutive Vulkan bindings for D3D12 descriptors. 2017-07-26 13:45:25 +02:00
Józef Kucia edd1e9602d libs/vkd3d-shader: Implement arbitrary mappings from D3D shader register to Vulkan descriptors.
An arbitrary mapping can be passed to vkd3d_shader_compile_dxbc().
2017-07-26 13:45:25 +02:00
Józef Kucia d39d0e4c9f libs/vkd3d: Fix memory leak in d3d12_root_signature_init(). 2017-07-25 18:47:42 +02:00
Sven Hesse 3328be8c87 libs/vkd3d: Unroll descriptor tables and fill in push constants 2017-07-25 17:41:58 +02:00
Józef Kucia d0a4238e39 libs/vkd3d: Allocate Vulkan descriptors for UAVs. 2017-07-25 12:50:14 +02:00
Józef Kucia d1de972430 libs/vkd3d: Allocate Vulkan descriptors for samplers. 2017-07-17 16:25:29 +02:00
Józef Kucia 593a13402d libs/vkd3d: Add support for static samplers.
We still do not implement any reasonable mapping between D3D registers
and Vulkan bindings.
2017-07-17 16:25:29 +02:00
Józef Kucia 091ac41f79 libs/vkd3d: Partially handle descriptor table root parameters. 2017-07-17 16:25:29 +02:00
Józef Kucia f3d297574a libs/vkd3d: Implement d3d12_device_CreateSampler(). 2017-07-12 13:10:44 +02:00
Józef Kucia 4e5fcb5141 libs/vkd3d: Use negative viewport height to flip along y-axis.
Requires VK_KHR_maintenance1.
2017-06-21 22:00:19 +02:00
Józef Kucia 9948abda96 libs/vkd3d: Flip SV_Position.y in last vertex processing shader stage.
The handwritten GLSL shaders do this.
2017-06-21 12:22:20 +02:00
Józef Kucia c270d9a859 libs/vkd3d: Accept DXBC shaders. 2017-06-19 19:49:11 +02:00
Józef Kucia 84889646f6 Update license to LGPL v2.1. 2017-06-16 22:11:21 +02:00
Józef Kucia a680fdd91b libs/vkd3d: Implement d3d12_command_list_OMSetStencilRef(). 2017-03-05 22:23:37 +01:00
Henri Verbeet 0b2702d96e libs/vkd3d: Implement d3d12_command_list_SetGraphicsRootSignature(). 2016-11-13 00:45:25 +01:00
Henri Verbeet 0f38858996 libs/vkd3d: Implement D3D12_ROOT_PARAMETER_TYPE_CBV root signature parameters. 2016-11-13 00:44:19 +01:00
Henri Verbeet d97df34093 libs/vkd3d: Implement depth/stencil pipeline state attachments. 2016-11-13 00:42:31 +01:00
Henri Verbeet 2e10db6f8e libs/vkd3d: Add support for D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA. 2016-11-10 16:41:01 +01:00
Józef Kucia f5ecb635fe libs/vkd3d: Ignore blending parameters when blending is disabled. 2016-10-12 11:46:57 +02:00
Józef Kucia a1082ec954 libs/vkd3d: Use "< 0" to test VkResult for errors.
For consistency.
2016-10-11 13:43:04 +02:00
Henri Verbeet 5c9ea3ede3 libs/vkd3d: Implement d3d12_device_CreateGraphicsPipelineState(). 2016-10-10 17:26:38 +02:00
Henri Verbeet a0ccb1c581 libs/vkd3d: Implement d3d12_command_list_SetPipelineState(). 2016-10-10 17:26:13 +02:00
Józef Kucia 2424137c0b libs/vkd3d: Implement compute pipeline state. 2016-09-26 11:46:45 +02:00
Józef Kucia fdf8eb775f libs/vkd3d: Implement empty root signature. 2016-09-26 11:46:45 +02:00
Józef Kucia 471a58b4b8 libs/vkd3d: Add ID3D12PipelineState interface stub. 2016-09-26 11:22:33 +02:00
Józef Kucia aec10bd682 libs/vkd3d: Add ID3D12RootSignature interface stub. 2016-09-26 11:22:33 +02:00