Commit Graph

936 Commits

Author SHA1 Message Date
Philip Rebohle 9970dfaeca
[dxvk] Add format info flag for integer formats 2018-04-11 16:21:59 +02:00
Philip Rebohle 6a0ab19049
[dxvk] Added meta shaders for image/buffer clear operations
The D3D11 ClearUnorderedAccessView* and ClearView functions
will have to be emulated using compute shaders rather than
clear operations, since Vulkan clear operations do not take
image views and their format into account.
2018-04-11 13:07:04 +02:00
Philip Rebohle 4797645bd2
[dxvk] Removed unused DxvkOptions 2018-04-11 13:06:43 +02:00
Philip Rebohle 8ea17e7a25
[dxbc] Implemented Nop instruction
Required for Metal Gear Solid V.
2018-04-11 01:49:39 +02:00
Philip Rebohle f3544cc8e1
[dxbc] Fix __GL_NextGenCompiler check... 2018-04-11 01:17:07 +02:00
Philip Rebohle 3ff437ddbe
[dxbc] Re-enable Nvidia workarounds if __GL_NextGenCompiler is '0'
Fixes potential regressions when using the old SPIR-V compiler.
2018-04-11 00:26:42 +02:00
Philip Rebohle 1b6442b859
[dxbc] Disable Nvidia-specific workarounds for 396.18 and above 2018-04-11 00:20:24 +02:00
Philip Rebohle a2f96f9728
[dxgi] Remove unnecessary debug output 2018-04-10 22:10:32 +02:00
Philip Rebohle dd3f4c89ac
[dxgi] Implement gamma control methods for DxgiOutput 2018-04-10 22:07:25 +02:00
Philip Rebohle ad7f0971cf
[dxgi] Create persistent DxgiOutput object 2018-04-10 22:07:00 +02:00
Philip Rebohle f13011f487
[dxgi] Implement gamma ramp in presenter
Will be used to fake IDXGIOutput::SetGammaControl.
2018-04-10 20:44:55 +02:00
Philip Rebohle 41132b8c13
[dxgi] Re-implement presentation shaders in GLSL 2018-04-10 18:46:39 +02:00
Philip Rebohle f6c6f5eb1f
[general] Updated README
Fixed a typo + minor fixes.
2018-04-10 17:10:47 +02:00
Managor 6f4a204419 Added instructions for installing from the easy build script. (#264)
* Added instructions for installing from the easy build script.

* Skipped the packaging part by adding --no-package

* Update README.md

Rephrased some things a bit.
2018-04-10 17:08:04 +02:00
Philip Rebohle a28303c4bd
[dxvk] Optimize binding ID remapping
We don't need to iterate over the full shader code when creating
a new shader module. This optimization may slightly reduce the
initial pipeline creation time.
2018-04-10 12:48:46 +02:00
Philip Rebohle 5d1642af1f
[spirv] Track instruction offset in instruction iterator 2018-04-10 12:48:24 +02:00
Philip Rebohle 1fb22a6022
[dxbc] Refactored opcode controls 2018-04-10 08:01:54 +02:00
Philip Rebohle 5cb65a6c19
[dxbc] Fix sampleinfo_uint instruction 2018-04-09 22:52:59 +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 8a4e1d11b7
[dxbc] Add missing component count to gs_layer variable type
Fixes an incorrect geometry shader in Overwatch.
2018-04-09 00:20:27 +02:00
Philip Rebohle bd5254f8d3
[d3d11] Fixed compiler errors
Why the hell did my GCC not complain about this earlier?
2018-04-08 22:26:35 +02:00
Philip Rebohle 687ef77860
[dxvk] Enable sample rate shading if needed 2018-04-08 21:49:30 +02:00
Philip Rebohle 797d7ec81d
[dxbc] Enable CapabilitySampleRateShading capability when needed
Fixes SPIR-V validation errors in the Final Fantasy XV benchmark.
2018-04-08 21:06:58 +02:00
Philip Rebohle 4c3e77e9e3
[dxvk] Add missing format info for the *_422_UNORM formats 2018-04-08 20:40:12 +02:00
Philip Rebohle e38cc4a0e0
[dxbc] Implement support for SV_PrimitiveID
Fixes some geometry/tessellation shaders in The Witcher 3.
2018-04-08 18:25:44 +02:00
Philip Rebohle 83a0eda4f6
[dxgi] Fixed packed 16-bit format mappings 2018-04-08 15:19:26 +02:00
pchome acaf6c9e87 [d3d11] Fix compilation with WINE headers (#247)
All this structures are defined in WINE headers but `D3D11_FORMAT_SUPPORT2`.
2018-04-07 14:02:57 +02:00
pchome 62b99c9bd2 [util] Fix compilation with WINE headers (#246)
* [util] Define typeof keyword for WINE guiddef.h

GCC: `-std options disable certain keywords`
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html

MinGW: `#define __uuidof(type) __mingw_uuidof<__typeof(type)>()`
WINE: `#define __uuidof(type) __wine_uuidof<typeof(type)>()`

* [util] Fix compilation with WINE headers

Overall definitions are the same but `__wine_` prefix used in .

MinGW: _mingw.h + guiddef.h
WINE: guiddef.h
2018-04-07 14:01:13 +02:00
Philip Rebohle 16c2ea5d82
[general] Updated README
Clarified information about environment variables.
2018-04-07 13:57:16 +02:00
Philip Rebohle 196dd1273b
[general] Update README 2018-04-07 13:52:50 +02:00
Philip Rebohle 00a452ed89
[d3d11] Implement DXBC shader module cache
If an application compiles the same shader multiple times, we should reuse
an already existing DxvkShaderModule instead of creating a new one. This
helps keep the number of DxvkGraphicsPipeline objects low in games such
as Rise of the Tomb Raider.
2018-04-06 17:54:02 +02:00
Philip Rebohle 38291356a7
[general] Fix another README typo 2018-04-06 09:42:49 +02:00
Craig Barnes e98baad11f Fix typos in README.md (#244) 2018-04-06 09:42:16 +02:00
Philip Rebohle bd17be472d
[dxbc] Reciprocate W component of SV_POSITION in pixel shaders
Fixes the fog effect in Nier:Automata, as well as some major
visual issues in Rise of the Tomb Raider, and potentially
other games.
2018-04-05 20:10:00 +02:00
Philip Rebohle 4d28f765df
[dxvk] Remove support for VK_AMD_rasterization_order
RADV will be doing this by default when it makes sense.
2018-04-04 15:09:24 +02:00
Philip Rebohle 492c7384bc
[dxbc] Implemented ImmAtomicCmpExch and AtomicCmpStore 2018-04-04 13:59:43 +02:00
Philip Rebohle e06300d592
[d3d11] Fix multisample format support query for depth images
Fixes a crash in World of Warships when reflections are enabled.
2018-04-04 11:24:16 +02:00
pchome 6a6871ee42 [dxgi] Fix compilation with WINE headers (#236)
* [dxgi] Fix compilation with WINE headers

```gcc
error: cannot convert 'MONITORINFOEX* {aka tagMONITORINFOEXA*}' to 'LPMONITORINFO {aka tagMONITORINFO*}' for argument '2' to 'BOOL GetMonitorInfoA(HMONITOR, LPMONITORINFO)'
```
```clang
cannot initialize a parameter of type 'LPMONITORINFO' (aka 'tagMONITORINFO *') with an rvalue of type '::MONITORINFOEX *' (aka 'tagMONITORINFOEXA *')
```

This can be WINE bug but I don't want to dig now, firs suggestion is wrong "tag":
wine variant
```c
typedef struct tagMONITORINFO
{
...
} MONITORINFO, *LPMONITORINFO;

typedef struct tagMONITORINFOEXA
{   /* the 4 first entries are the same as MONITORINFO */
...
} MONITORINFOEXA, *LPMONITORINFOEXA;

typedef struct tagMONITORINFOEXW
{   /* the 4 first entries are the same as MONITORINFO */
...
} MONITORINFOEXW, *LPMONITORINFOEXW;

DECL_WINELIB_TYPE_AW(MONITORINFOEX)
DECL_WINELIB_TYPE_AW(LPMONITORINFOEX)
```  
VS
MinGW variant
```c
  typedef struct tagMONITORINFO {
...
  } MONITORINFO,*LPMONITORINFO;

  typedef struct tagMONITORINFOEXA : public tagMONITORINFO {
    CHAR szDevice[CCHDEVICENAME];
  } MONITORINFOEXA,*LPMONITORINFOEXA;

  typedef struct tagMONITORINFOEXW : public tagMONITORINFO {
    WCHAR szDevice[CCHDEVICENAME];
  } MONITORINFOEXW,*LPMONITORINFOEXW;

  __MINGW_TYPEDEF_AW(MONITORINFOEX)
  __MINGW_TYPEDEF_AW(LPMONITORINFOEX)
```

* [dxgi] Fix compilation with WINE headers

Use C++-style casts rather than C ones.
2018-04-03 21:11:26 +02:00
Philip Rebohle 89c3b60640 [dxvk] Removed upper limit for CS chunks
Since we are synchronizing once per frame anyway, there is no need to
artificially limit the number of chunks in flight. Applications which
use deferred contexts and submit a large number of CS chunks through
command lists may benefit from this optimization.
2018-04-03 20:06:25 +02:00
Philip Rebohle 7de27d4fd8 [d3d11] Flush immediate context on command list execution
This optimization may help keep the GPU busy in case there's
a large number of draw calls pending at the time a command
list from a deferred context is submitted for execution.
2018-04-03 19:53:37 +02:00
Philip Rebohle 0b2e88b087 [hud] Added <unordered_map> include to satisfy some compilers 2018-04-03 16:27:16 +02:00
Philip Rebohle 1c22ae9796 [general] Updated README
Documented HUD options.
2018-04-03 16:03:15 +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 fc3f45c082 [hud] Added stat counters to the HUD 2018-04-03 14:49:13 +02:00
Philip Rebohle 3ed03f7a3d [hud] Added configurable HUD
HUD elements can be enabled individually using a comma-separated
list. Supported options include:
- fps: Displays the framerate
- devinfo: Displays device info

Passing "1" has the same effect as "fps,devinfo".
2018-04-03 12:33:08 +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 c9465b39d1 [util] Implement spin lock 2018-04-03 11:56:02 +02:00
Philip Rebohle a5077952ea [dxvk] Reintroduce stat counters 2018-04-03 11:03:57 +02:00
Philip Rebohle 4b44d3ce39 [dxbc] Unify constants
Identical constants will now be reused. Considerably reduces code size.
2018-04-02 19:41:22 +02:00