Commit Graph

101 Commits

Author SHA1 Message Date
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