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

github.com/HansKristian-Work/vkd3d-proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-13vkd3d: Cleanup some mismatching uses of vkd3d_malloc.malloc-wrapper-fixHans-Kristian Arntzen
It's just a wrapper, but we should be consistent. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-10-11vkd3d: Add PREALLOCATE_SRV_MIP_CLAMPS workaround for Halo Infiniteesullivan-nvidia
Halo Infinite currently has a race condition that can result in a GPU fault on NVIDIA hardware. The root cause of this race condition is the application overwriting existing SRV descriptors with a new mip clamp value asynchronously to the applications GPU submission timeline. This is problematic for vkd3d because it requires creating a new VkImageView to represent the SRV with the updated mip clamp value. If this SRV is being created after work has been submitted that accesses it, the GPU may not see the correct descriptor state possibly resulting in a fault. This commit adds the VKD3D_CONFIG_FLAG_PREALLOCATE_SRV_MIP_CLAMPS configuration as a workaround to the race condition. It works by preallocating all the VkImageViews for each possible mip clamp level the application may attempt to create for the resource. Technically this is still a race condition but the end result isn't a GPU fault if the race condition is lost. Instead the shader will just sample from the texture with the previous SRVs mip clamp level rather than the updated one. These are the same outcomes that are possible on RADV without this workaround. Signed-off-by: Eric Sullivan <esullivan@nvidia.com>
2022-10-07vkd3d: Reset current_buffer_index when changing swapchain size.Hans-Kristian Arntzen
If application lowers the count, we might access resources out of bounds later. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-10-07vkd3d: Consider that CACHED can be an optional memory type.Hans-Kristian Arntzen
Some resources might only expose HOST | COHERENT and not CACHED | COHERENT. If we cannot find a suitable type, just try again immediate with just COHERENT. Never try to fallback allocations on the outside. If we fail to allocate system memory, there is nothing we can do. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-10-07vkd3d: Handle fallback scenarios where a type mask does not exist.Hans-Kristian Arntzen
If we request DEVICE | HOST_VISIBLE and the driver does not expose the type at all, we'll hit fallback logic that assumes we actually failed to allocate rather than failed to identify a candidate memory type. Attempt fallbacks in the try functions as well if we did not identify a suitable memory type at all. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-10-06vkd3d-shader: Return -1 for FIRSTBIT_(S)HI when we have to.Georg Lehmann
With the added benefit that vulkan drivers can optimize this to the native dxbc instruction. Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2022-10-06tests: Improve firstbithi tests.Georg Lehmann
Proves that vkd3d-shader currently doesn't handle the -1 case correctly. The old test didn't show that because the code fxc inserts to convert the index from MSB-first to LSB-first hides the bug. Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2022-10-05vkd3d: Add another host memory import workaround.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-10-04dxil-spirv: Update submodule.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23tests: Add missing UAV barrier in test_tgsm.Hans-Kristian Arntzen
Spuriously started failing on NV. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23dxil-spirv: Update submodule.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23vkd3d-shader: Reimplement MD5 checksum.Hans-Kristian Arntzen
Reuse the renderdoc implementation directly (MIT license). Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23vkd3d-shader: Add MD5 implementation pulled from RenderDoc 3rdparty/.Hans-Kristian Arntzen
MIT compatible license. RenderDoc ships this already. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23vkd3d-shader: Remove unused trace.c code.Hans-Kristian Arntzen
We're aiming to relicense and this is ancient code we cannot track down. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23tests: Add migration test for checksum algorithm.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-23tests: Add shader-api tests to build system.Hans-Kristian Arntzen
Fix some build issues as well. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-21vkd3d: Add missing descriptor type to local descriptor pools.Philip Rebohle
We're using storage buffers for various internal operations. Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2022-09-21tests: Add TODO for file mapping heap import test.Hans-Kristian Arntzen
This is likely hitting the limitation that even memfd (or whatever wine uses) cannot be imported at the moment. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-21vkd3d: Add some logging for descriptor heap allocations.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-21vkd3d: Disable shader caches entirely when capturing.Hans-Kristian Arntzen
Only serves to invalidate existing caches and increases memory pressure unnecessarily. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-17vkd3d: Fix wrong resource used in image -> buffer copy.Hans-Kristian Arntzen
Need to track source here, not dest. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-17vkd3d: Only skip initial layout transition if single subresource.Hans-Kristian Arntzen
write_full_subresource may allow us to transition from UNDEFINED so that we can skip the initial layout transition, but not in the scenario where the resource has multiple subresources. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Implement VK_EXT_shader_module_identifier.Hans-Kristian Arntzen
Instead of storing SPIR-V in the cache, we can store identifiers instead. Saves 95% storage of the vkd3d-proton cache. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Enable VK_EXT_shader_module_identifier.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Add helper for late compilation of DXBC -> SPIR-V.Hans-Kristian Arntzen
To be used by EXT_shader_module_identifier implementation. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Use rwlock instead of spinlock in PSO fallback cache.Hans-Kristian Arntzen
If we defer SPIR-V compilation we risk holding the lock for quite a long time. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Allow more initial resource states for UPLOAD/READBACK.Hans-Kristian Arntzen
AgilitySDK 606 now suddenly allows this, but docs still say it's banned, so ... *shrug* F1 22 relies on this to work. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Add stricter checks for initial resource state and resource flag.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Actually allow unaligned mip 0 on compressed textures.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-16vkd3d: Implement SetColorSpace1Joshua Ashton
2022-09-16vkd3d: Implement CheckColorSpaceSupportJoshua Ashton
Simply checks if we have a surface format that supports the given color space.
2022-09-16vkd3d: Implement SetHDRMetaDataJoshua Ashton
2022-09-16vkd3d: Enable VK_EXT_hdr_metadataJoshua Ashton
This extention has no features or properties structures.
2022-09-15vkd3d: Enable promoted VK_EXT_mutable_descriptor_type.Hans-Kristian Arntzen
Trivial alias, support both variants for now. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-15vkd3d: Add VKD3D_CONFIG environment for disabling host memory imports.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14cache: Explicitly do not serialize SPIR-V code for cached PSOs.Hans-Kristian Arntzen
With upcoming refactor, we might have to compile code on the fly. To avoid any race conditions on fallback compile storing code[i] <-> StorePipeline reading code[i], explicitly mark that code[] should be ignored. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Separate compilation to SPIR-V and creation of VkShaderModule.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Stub out DXBC code duplication for later.Hans-Kristian Arntzen
When we have the ability to load PSO from identifiers only, we need to retain DXBC blobs for later. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Separate out the different stages of graphics PSO creation.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Refactor stages of obtaining SPIR-V modules.Hans-Kristian Arntzen
- Try to load SPIR-V from cache - Fallback compile to SPIR-V if necessary - Parse PSO metadata obtained from either compilation or cache lookup Also moves SPIR-V compilation to end of PSO init. Prepares for refactor where we completely decouple PSO creation info setup and SPIR-V compilation. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Prepare for system where we can retain DXBC blobs in pipeline.Hans-Kristian Arntzen
Simplifies the code somewhat. Only iterate over the shader_stages LUT once. Adds concept of duped DXBC blobs as well. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Use proper cached pso struct when creating pipeline cache.Hans-Kristian Arntzen
FWIW, this is mostly dead code now, missed during initial implementation. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Add FIXME for dubious use of dsv_plane_optimal_mask.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Hoist out pipeline cache creation.Hans-Kristian Arntzen
Not super useful to create a local pipeline cache if we're not going to compile early, but it's super rare, and cleans up the code either way. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Streamline vkd3d_create_compute_pipeline.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Move shader interface helpers to their intended code location.Hans-Kristian Arntzen
Splitting up the refactor into two commits like this made the patches easier to read and makes the rebase easier as well. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Sink shader interface struct build to where we need it.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Refactor MS/PS stage map into cached_desc.Hans-Kristian Arntzen
Makes further refactoring more sane. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-14vkd3d: Refactor out how XFB info is stored.Hans-Kristian Arntzen
For deferred compilation, we need to dupe the structs. XFB is kinda rare, so it's okay to eat allocations here. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-09-13vkd3d: Refactor MS/PS interface setting to the helper.Hans-Kristian Arntzen
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>