Commit Graph

59 Commits

Author SHA1 Message Date
Philip Rebohle 5d1f00be34
[dxvk] Implement shader-based meta-resolve operation
This should work around a variety of potential driver issues
when games resolve typeless images with a different format.
2018-06-23 13:17:01 +02:00
Philip Rebohle aa3e718fcd
[dxvk] Add DxvkOptions struct for quick lookup of features/limits 2018-06-22 00:29:44 +02:00
Philip Rebohle 4b37590e14
[dxvk] Use new mip map generator 2018-05-25 17:45:41 +02:00
Philip Rebohle 37456d583e
[dxvk] Move DxvkPipelineCache to DxvkPipeManager
Since the pipeline cache isn't used for anything else but compiling
pipelines, keeping this stuff together is much more useful.
2018-05-09 14:26:45 +02:00
Philip Rebohle 5e02c1bb2f [dxvk] Move DxvkPipelineManager instance back to DxvkDevice 2018-05-01 16:56:33 +02:00
Philip Rebohle 1bbfe77013 [dxvk] Refactor DxvkFramebuffer and DxvkRenderpass 2018-04-30 15:47:29 +02:00
Philip Rebohle 9aa73d1148 [dxvk] Set non-zero framebuffer size when there are no attachments
This is required for UAV-only rendering and will be required for
stream output in the future as well.
2018-04-29 11:19:18 +02:00
Philip Rebohle a6a22cd00a
[dxvk] Export DxvkDeviceQueue from DxvkDevice
Access to the Vulkan queues provided by the DXVK device
is required for external Vulkan libraries to work.
2018-04-19 15:42:48 +02:00
Philip Rebohle 676b0cb476
[dxvk] Added DxvkMetaClearObjects stub 2018-04-11 17:05:12 +02:00
Philip Rebohle 4797645bd2
[dxvk] Removed unused DxvkOptions 2018-04-11 13:06:43 +02:00
Philip Rebohle d68d62f837
[dxvk] Removed on-disk pipeline cache
Drivers from both major vendors implement their own shader cache
already, and storing a cache per game causes more issues than it
solves. Should fix #261.
2018-04-09 19:38:32 +02:00
Philip Rebohle 9ef4168867 [dxvk] Added support for pipeline-related stat counters 2018-04-03 15:52:39 +02:00
Philip Rebohle 561fa7440b [dxvk] Retrieve actual memory stats for the HUD 2018-04-03 15:32:00 +02:00
Philip Rebohle 8aa8610221 [dxvk] Implement basic stat counters for draw calls, queue ops 2018-04-03 11:56:12 +02:00
Philip Rebohle 6e27f12e22
[dxvk] Move DxvkPipelineManager object to DxvkContext
Since we create only one DxvkContext per D3D11Device, rather than
per D3D11DeviceContext as originally planned, there is no need to
keep the pipeline manager as a global thread-safe object. This may
slightly reduce CPU overhead.
2018-03-29 12:32:20 +02:00
Philip Rebohle 44d8d6b8c3
[dxvk] Fixed command buffer synchronization 2018-03-22 20:15:46 +01:00
Philip Rebohle 0bdae4f930
[dxvk] Move fence object into DxvkCommandList
Reduces command submission overhead by reusing fence objects
instead of creating new ones for each submission. Improves
error reporting in case the submission cannot be complete.
2018-03-22 18:57:33 +01:00
Sebastian Wick 4518b1b76e Shader cache (#188)
* [util] Adds getTempDirectory() function

Will be used by on-disk pipeline caching

* [dxvk] Implement on-disk shader caching

Saving the pipeline cache to disk when the application exits
should be sufficient but the DxvkPipelineCache destructor isn't
reliably called on exit (ref-counting issue?).
As a workaround every frame we check and save the cache if the
size increased by some amount or after one minute elapsed.

* [dxvk] Periodically update shader cache file in separate thread
2018-03-21 02:45:11 +01:00
Philip Rebohle fb36b56891
[dxvk] Removed stat counters 2018-03-10 17:37:10 +01:00
Philip Rebohle 83eb34d71c
[dxvk] Replaced exception by error message 2018-03-01 08:23:55 +01:00
Philip Rebohle dd237d866d
[dxvk] Make query pools more usable as query allocators 2018-02-15 13:25:18 +01:00
Philip Rebohle 54cfdbdc51
[dxvk] Implemented more query and query pool methods 2018-02-13 13:43:27 +01:00
Philip Rebohle c66492a90f
[dxvk] Initialize dummy resources to zero
Read access to unbound images and buffers usually yields
a result vector that contains zeroes in all components.
2018-02-01 14:26:38 +01:00
Philip Rebohle d74be35e8c
[dxvk] Refactored physical buffer
Class is now much more generic, which should make things
easier for the upcomping deferred context implementation
2018-01-29 00:01:00 +01:00
Philip Rebohle d1f76b96af
[dxvk] Added dummy resources for descriptors
This should finally shut up validation layers and also allows
the branches in texture sample operations to be removed.
2018-01-27 19:25:41 +01:00
Philip Rebohle a0acbeec72
[dxvk] Optimized buffer renaming
Helps applications which frequently update buffers
through either Map()/Unmap() or UpdateSubresource.
2018-01-19 00:20:05 +01:00
Philip Rebohle a87ae8aba4
[dxvk] Added DxvkPhysicalBuffer to back virtual buffers
This is the first step to optimizing buffer updates for applications
that frequently invalidate buffers. The goal is to reduce the number
of buffer allocations per frame and reduce the cost of invalidation.
2018-01-18 15:52:57 +01:00
Philip Rebohle d3f84688cc
[dxvk] Make use of VK_AMD_rasterization_order
May slightly improve GPU performance in some scenarios.
2018-01-16 15:00:19 +01:00
Philip Rebohle 27573e9b25
[dxvk] Added app and device specific options 2018-01-16 13:58:57 +01:00
Philip Rebohle bc5dfc1cad
[dxvk] Refactored device extension handling
Support for extensions can now be queried from the device
object in an efficient way. This will allow the backend to
use optional extensions for the purpose of optimization.
2018-01-16 13:24:36 +01:00
Philip Rebohle c1f16d36bd [dxvk] Implemented local pipeline cache 2018-01-13 22:18:32 +01:00
Philip Rebohle 5dd9fea011 [dxvk] Implemented input layout validation
Checks whether all input slots consumed by the vertex shader
are provided by the input layout, and disables rendering in
case the state validation fails. This should hopefully fix
GPU lockups in Nier:Automata.
2018-01-12 14:25:26 +01:00
Philip Rebohle 1fe5b74762 Optimized command submission
Command submission now does not synchronize with the device every single
time. Instead, the command list and the fence that was created for it are
added to a queue. A separate thread will then wait for the execution to
complete and return the command list to the device.
2017-12-16 18:10:55 +01:00
Philip Rebohle d3b2174180 [dxvk] Implemented buffer renaming 2017-12-16 13:21:11 +01:00
Philip Rebohle 2a266eaad4 [general] Added 32-bit support 2017-12-12 12:50:52 +01:00
Philip Rebohle 23abc82aa0 [dxvk] Added performance counter class 2017-12-12 10:29:17 +01:00
Philip Rebohle 3de427439b [dxvk] Added proper documentation for staging buffers 2017-12-12 00:41:56 +01:00
Philip Rebohle de47fa29e1 [dxvk] Refactored Vulkan device and instance destruction, now more RAII friendly 2017-12-11 19:48:00 +01:00
Philip Rebohle 68ca71d8a4 [dxvk] Implemented recycling of command buffers and staging buffers 2017-12-11 19:17:08 +01:00
Philip Rebohle 52f1c4fa00 [dxvk] Implemented staging buffers for large data transfers 2017-12-10 15:57:51 +01:00
Philip Rebohle e872448ca3 [dxbc] Refactored shader compiler to return a DxvkShader 2017-12-08 18:14:05 +01:00
Philip Rebohle 19851c8432 [dxvk] Re-implemented pipeline creation within the backend 2017-12-07 09:38:31 +01:00
Philip Rebohle b5d068366d [dxvk] Implemented shader resource binding 2017-12-03 20:23:26 +01:00
Philip Rebohle a6bf7659b0 [dxvk] Refactored shader binding, client APIs must now create pipelines and pipeline layouts 2017-12-03 00:40:58 +01:00
Philip Rebohle ac2d16599c [d3d11] Implemented proper feature tests 2017-12-02 16:47:06 +01:00
Philip Rebohle 802fbe3cfd [dxvk] Some minor refactoring 2017-12-01 14:27:53 +01:00
Philip Rebohle b389c9ea1f [d3d11] Experimental implementation of OMSetRenderTargets and ClearRenderTargetView 2017-11-29 20:19:40 +01:00
Philip Rebohle c572a9c393 [dxvk] Implemented image creation 2017-11-27 12:01:35 +01:00
Philip Rebohle f924931d2d [general] Removed TRACE calls for now 2017-11-26 14:01:41 +01:00
Philip Rebohle 47bdf9408b [dxvk] Added buffer view class 2017-11-21 19:50:57 +01:00