Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/vkd3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-04Revert "vkd3d: Bump RootSignature version to 1.1."HEADproton_4.11-nextAndrew Eikum
This reverts commit c002aee119b638d30eeb7cdc91099449ccafeafc. This commit caused a bunch of problems which are still being worked out upstream.
2019-11-04vkd3d: Allocate one large buffer for a heap and offset into it.Hans-Kristian Arntzen
Greatly reduce VA allocations we have to make and makes returned VA more sensible, and better matches returned VAs we see on native drivers. D3D12 usage flags for buffers seem generic enough that there is no obvious benefit to place smaller VkBuffers on top of VkDeviceMemory. Ideally, physical_buffer_address is used here, but this works as a good fallback if that path is added later. With this patch and previous VA optimization, I'm observing a 2.0-2.5% FPS uplift on SOTTR when CPU bound. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2019-10-31vkd3d: Do not report a root signature version higher than requested.Rémi Bernon
This fixes Shadow of the Tomb Raider crashing because of NULL root signatures being passed since c002aee119b638d30eeb7cdc91099449ccafeafc. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31tests: Test ClearUnorderedAccessView() with placed resources.Hans-Kristian Arntzen
Catches certain implementation issues which committed resources do not. 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-31vkd3d-shader: Support vicp inputs for hull shader fork/join phases.Philip Rebohle
This case needs special care since both VKD3DSPR_INPUT in the control point phase and VKD3DSPR_INCONTROLPOINT in fork/join phases refer to the same set of input variables, and we should not declare input variables with the same location twice. Encountered in Shadow of the Tomb Raider. 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-31tests: Test bindings after changing root signature.Philip Rebohle
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-31vkd3d: Keep active bindings after changing root signature.Philip Rebohle
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-27vkd3d/tests: Add tests for D3D12_HEAP_TYPE_CUSTOM.Conor McCarthy
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27vkd3d: Add support for custom heap properties.Conor McCarthy
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27vkd3d: Clamp buffer image copy size to subresource dimensions.Rémi Bernon
This fixes a vulkan validation error. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27vkd3d-shader: Don't redundantly override shader output info.Philip Rebohle
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-27vkd3d-shader: Handle tessellation factor built-ins in emit_output.Philip Rebohle
Uses the private patch constant array for tessellation factor built-ins. Fixes two separate issues encountered in Shadow of the Tomb Raider: - The output registers that have one component mapped to any of the TESS_FACTOR sysvals can have their other components mapped to a regular patch constant output, in which case we need to use a private io variable. - The tessellation factor outputs are not necessarily dynamically indexed within shader code. Previously, this did not work correctly and lead to invalid store operations in the generated SPIR-V. 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-27vkd3d-shader: Compute correct output array index for line tess factors.Philip Rebohle
Line tessellation factors use two different DXBC semantics that both map to the same SPIR-V built-in. In this case, we cannot rely on the semantic index. 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-27vkd3d-shader: Use full write mask for variables for array built-ins.Philip Rebohle
Private variables are always vec4, so using a sparse write mask here will lead to invalid code being generated when accessing the variable. 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-27vkd3d-shader: Use private array variable for patch constant outputs.Philip Rebohle
Fork and join phases in hull shaders allow dynamic indexing for all output registers, not just the tessellation factor built-ins. Moreover, the patch constant output register space is shared with join phases, which can read back the outputs computed in the fork phases, also allowing dynamic indexing. In order to support this in a not overly complex way, use a private array representing the entire patch constant space, and use epilogue functions to assign them to the actual output variables. 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-27vkd3d-shader: Add array index field to private output variable info.Philip Rebohle
Needed to support dynamically indexed output arrays. 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-27vkd3d-shader: Don't fetch output variable id before writing output info.Philip Rebohle
Otherwise, if a private variable is used for the given output, vkd3d_dxbc_compiler_emit_store_shader_output will write to the private variable again instead of the actual output, and some outputs may never be emitted. This is common in hull shaders. 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-27vkd3d: Optimise the GPU VA allocator.Hans-Kristian Arntzen
The GPU VA allocator was allocating memory in a way where dereferencing GPU VA required a lock + bsearch() to find the right VA range. Rather than going this route, we turn the common case into O(1) and lock-free by creating a slab allocator which allows us to lookup a pointer directly from a GPU VA with (VA - Base) / PageSize. The number of allocations in the fast path must be limited since we cannot trivially grow the allocator while remaining lock-free for dereferences. 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-27vkd3d: Align allocated GPU address ranges to the requested resource alignment.Hans-Kristian Arntzen
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-27vkd3d: Add support for multiplanar depth/stencil state transitions.Conor McCarthy
If separate transitions of the depth and stencil plane occur in the same array of barriers, they will be consolidated into one Vulkan layout transition. This can only be supported for combinations of depth read and depth write states, or identical states. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22vkd3d-shader: Don't shift output array component write mask.Philip Rebohle
Fixes an assertion when compiling shaders with more than four clip or cull distances. Output arrays are arrays of scalars, so shifting the write mask is not very meaningful. 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-22vkd3d: Bump RootSignature version to 1.1.Hans-Kristian Arntzen
There appears to be a complete implementation of RS 1.1 already, so enable this feature. 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-18vkd3d: Introduce vkd3d_format_get_data_offset().Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18vkd3d: Introduce vkd3d_format_copy_data().Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18vkd3d: Introduce d3d12_box_is_empty().Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18vkd3d: Introduce d3d12_resource_get_level_box().Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-04vkd3d: Implement ID3D12Resource::WriteToSubresource().Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01build: Enable -Wpointer-arith.Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01vkd3d-shader: Always emit the invocation count for geometry shaders.Henri Verbeet
Even if the shader doesn't explicitly declare it. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01vkd3d: Fix MSVC build in tests/d3d12.c.Hans-Kristian Arntzen
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-01vkd3d: Add MSVC path for atomic_add_fetch.Hans-Kristian Arntzen
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-01vkd3d: Do not use RESET_COMMAND_BUFFERS_BIT.Hans-Kristian Arntzen
By setting this flag, command pools cannot efficiently pool allocations. This flag should be set to 0 so only the VkCommandPool may be reset. This matches D3D12 API. 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-01vkd3d: Do not release resources in vkResetCommandPool.Hans-Kristian Arntzen
D3D12 command allocators are intended to recycle memory across resets, so we should do the same thing in vkd3d. 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-01vkd3d: Add test case for undisclosed CPU VA in Map.Hans-Kristian Arntzen
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-01vkd3d: Deal with Map out parameter being NULL.Hans-Kristian Arntzen
It is possible to map a resource, but not disclose the VA to caller. This is used for WriteToSubresource. 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-01vkd3d: Fix MSVC build of state.c.Hans-Kristian Arntzen
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-01vkd3d: Fix non-standard pointer arithmetic on void-pointer.Hans-Kristian Arntzen
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-01vkd3d: Fix use of non-standard vararg macros.Hans-Kristian Arntzen
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-01vkd3d: Fix stray semicolon in vulkan_procs.h.Hans-Kristian Arntzen
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-01vkd3d-shader: Fix MSVC build.Hans-Kristian Arntzen
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-01vkd3d: Add MSVC path for vkd3d_log2i.Hans-Kristian Arntzen
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-01vkd3d: Add MSVC path for popcount.Hans-Kristian Arntzen
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-01tests: Add tests for sample_l instruction.Jactry Zeng
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01tests: Add tests for bufinfo instructions.Jactry Zeng
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-24vkd3d: Make all descriptor reads and writes atomic.Conor McCarthy
Shadow of the Tomb Raider overwrites descriptors while they are being copied in another thread. This patch makes reads and writes atomic for CBV, SRV, UAV, and sampler descriptors, but not RTV and DSV, for which copying is not implemented. Benchmark total frames vs mutex count (the single mutex was locked only once for copying): 1 mutex: 6480 6489 6503 8 mutexes: 6691 6693 6661 16 mutexes: 6665 6682 6703 Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-13vkd3d-shader: Enable DemoteToHelperInvocation capability.Philip Rebohle
Fixes validation errors complaining about invalid shader modules. 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-08-12tests: Move invalid BC1_UNORM buffer view tests to d3d12_invalid_usage.Józef Kucia
Device is removed after CreateUnorderedAccessView(). 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-12vkd3d: Validate src_box in ReadFromSubresource().Józef Kucia
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-12tests: Add more tests for ReadFromSubresource().Conor McCarthy
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-12vkd3d: Implement ID3D12Resource::ReadFromSubresource().Conor McCarthy
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>