1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 04:24:11 +01:00
Commit Graph

1003 Commits

Author SHA1 Message Date
Philip Rebohle
757be61b70
[dxgi] Use per-adapter format lookup tables
Allows Nvidia cards to use 24-bit depth buffers.
2018-05-06 13:12:30 +02:00
Philip Rebohle
fb3dbd8bcd
[d3d11] Relaxed view format compatibility check
Fixes regressions in multiple games. MSDN docs regarding
format compatibility are wrong in every way.
2018-05-05 20:16:01 +02:00
Philip Rebohle
f4a92a685f
[d3d11] Normalize render target and depth-stencil view types
Fixes a regression in Kingdom Come: Deliverance that was
introduced in a55bee9554.
2018-05-05 15:53:49 +02:00
Philip Rebohle
5a639797d2
[d3d11] Fix stencil component mapping in shader resource views
Fixes terrain rendering in Far Cry 5.
2018-05-05 15:15:09 +02:00
Philip Rebohle
8177898151
[d3d11] Validate image view format compatibility
Fixes Vulkan validation errors in Far Cry 5.
2018-05-05 15:13:35 +02:00
Philip Rebohle
e1a27faa4a
[dxgi] Added DXGI format family info 2018-05-05 12:57:22 +02:00
Philip Rebohle
a55bee9554
[d3d11] Validate render targets before setting them up
Mimicks what native D3D11 does. Fixes validation errors in
Nier:Automata with multisampling enabled in some situations.
2018-05-05 09:12:36 +02:00
Philip Rebohle
fb288d8713
[d3d11] Disable VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT for typed formats
Yields over 10% performance improvement on RADV in GPU-bound scenarios.
2018-05-05 00:49:43 +02:00
Philip Rebohle
fe24d76fd0
[dxgi] Report D3D10 support only when DXVK_FAKE_DX10_SUPPORT is set
Should fix a regression in Assassin's Creed 4: Black Flag.
2018-05-05 00:48:35 +02:00
Philip Rebohle
94b74667e9
[dxgi] Fix Fullscreen->Windowed transition (again)
We need to preserve the flags if the application changes them.
This is in line with what native DXGI does.
2018-05-04 21:55:38 +02:00
Philip Rebohle
c2c8d8be8a
[d3d11] Minor formatting fix 2018-05-04 21:52:34 +02:00
Philip Rebohle
6cbc133619 [dxgi] Use ShowWindow instead of redundant SetWindowPos call 2018-05-04 17:53:02 +02:00
Philip Rebohle
de803b3670 [dxgi] Report refresh rate as a multiple of 1000 Hz
More closely emulates what Windows dows.
2018-05-04 17:37:29 +02:00
Philip Rebohle
9cec1ecca3 [d3d11] Fix stage and access mask for default constant buffers 2018-05-04 10:23:36 +02:00
Philip Rebohle
ac1d505d14 [dxvk] Do not compute SHA-1 hash of generated shaders
We do not need this on this branch.
2018-05-04 00:16:39 +02:00
Philip Rebohle
ae0e5bccdd [dxvk] Make shader accessible from shader module 2018-05-03 23:56:28 +02:00
Philip Rebohle
33357f1f36 [dxvk] Compute SHA-1 hash of generated shaders 2018-05-03 23:56:22 +02:00
Philip Rebohle
3a3b1eda59 [dxvk] Move render pass out of pipeline state vector 2018-05-03 23:48:45 +02:00
Philip Rebohle
59d4f1a1fb [util] Add method to retrieve SHA1 hashes in 32-bit chunks 2018-05-03 23:47:42 +02:00
Philip Rebohle
77d0424d7f [dxgi] Advertize support for ID3D10Device and ID3D10Device1
We don't actually support these, but applications can reasonably
assume that D3D10 is supported if D3D11 is present. Closes #329.
2018-05-02 17:00:56 +02:00
Philip Rebohle
27d3a78d79 [dxbc] Omit empty source string in OpSource instruction
This parameter is optional and confuses RenderDoc if present.
2018-05-02 13:07:26 +02:00
Philip Rebohle
5683422208 Merge branch 'clearopt' 2018-05-02 00:45:17 +02:00
Philip Rebohle
e30a8299e6 [dxvk] Refactor DxvkFramebuffer and DxvkRenderpass 2018-05-02 00:45:10 +02:00
Philip Rebohle
41fca78d27 [dxgi] Add GetDevice method to IDXGIVkInteropSurface
Convenient way of getting the IDXGIVkInteropDevice from the surface
without having to go through several D3D interface queries.
2018-05-01 23:30:39 +02:00
Philip Rebohle
badb93334e [dxvk] Fix DxvkContext::transformImage
We have to spill the render pass before transforming the
image. We don't need the barrier if the old and new
layout are the same.
2018-05-01 23:29:58 +02:00
Philip Rebohle
5e02c1bb2f [dxvk] Move DxvkPipelineManager instance back to DxvkDevice 2018-05-01 16:56:33 +02:00
Philip Rebohle
d201a1f7c6 [dxvk] Made pipe manager and pipeline classes thread-safe 2018-05-01 16:45:28 +02:00
Philip Rebohle
cf1358b2f4 [dxvk] Fixed partial depth-stencil clear operations 2018-04-30 21:42:16 +02:00
Philip Rebohle
4c298d486d [dxgi] Restore display mode even when the window got destroyed 2018-04-30 20:15:35 +02:00
Philip Rebohle
46f2e4d864 [dxgi] CheckInterfaceSupport; Log interface queries 2018-04-30 20:01:50 +02:00
Philip Rebohle
370ff34e9f [d3d11] Fix sampler state validation for anisotropy
Fixes an issue where samplers are not created in Path of Exile.
2018-04-30 19:38:38 +02:00
Philip Rebohle
2626a26072 [d3d11] Fix sampler state validation for anisotropy
Fixes an issue where samplers are not created in Path of Exile.
2018-04-30 19:36:42 +02:00
Philip Rebohle
ba53cf92ac Revert "[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass"
This reverts commit 1bbfe77013.
Breaks Path of Exile.
2018-04-30 18:47:35 +02:00
Philip Rebohle
5d5be87402 [dxvk] Oprimize render target clear operations
We can save one image layout transition when clearing a render
target by delaying clears until vkCmdBeginRenderPass is called.
2018-04-30 17:04:13 +02:00
Philip Rebohle
16a25db846 Merge branch 'master' of https://github.com/doitsujin/dxvk 2018-04-30 15:56:32 +02:00
Philip Rebohle
1bbfe77013 [dxvk] Refactor DxvkFramebuffer and DxvkRenderpass 2018-04-30 15:47:29 +02:00
ZeroFault
768a078250 [d3d11] Implement state block normalization (#333)
* [d3d11] implement stateblock normalization

* add const to default state description object

* fix code formatting

* Correct the blend state normalization

* add missing error return

* code cleanup and refactoring

* remove unecessary const qualifier and fix code formatting

* [d3d11] Cosmetic changes
2018-04-30 10:41:57 +02:00
Philip Rebohle
a32050374c [dxgi] Implement display mode changes
Allows games to change the screen resolution in fullscreen
mode. This is currently in a rough shape and some games may
not work as expected when selecting fullscreen mode.
2018-04-29 23:03:27 +02:00
Philip Rebohle
a3c561f9dc [dxgi] LeaveFullscreenMode: Correctly restore the window size 2018-04-29 17:26:00 +02:00
Philip Rebohle
1bcae90dd0 [dxvk] Fix image layouts for images using VK_IMAGE_TILING_LINEAR
We have to use VK_IMAGE_LAYOUT_GENERAL for those. On top of that,
we should avoid image transitions when the image is in GENERAL
layout anyway in order to save some time on the GPU.
2018-04-29 15:28:50 +02:00
Philip Rebohle
d5041337f5 [d3d11] Use linar tiling for textures if optimal tiling is not supported
Fixes texture creation issues in various Batman games.
2018-04-29 14:43:24 +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
7cb7e4a944 Merge branch 'master' of https://github.com/doitsujin/dxvk 2018-04-28 14:18:18 +02:00
Philip Rebohle
99813a7778 [d3d11] Use const ref pointer for device parameter
Closes #323.
2018-04-28 14:17:52 +02:00
pchome
4a74cd45d5 [clang-tidy] performance-move-const-arg fix (#324)
https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html
2018-04-28 14:13:23 +02:00
pchome
1dbf8bf2a1 [dxvk] Fix native build on *nix x86_64 systems (#328)
* [dxvk] Fix native build on *nix x86_64 systems

> /usr/include/c++/v1/algorithm:2633:1:
> note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned long' vs. 'unsigned long long')

winegcc, clang-tidy and other native build types/tools are affected.

http://en.cppreference.com/w/cpp/language/types#Data_models
> 64 bit systems:
> * LLP64 or 4/4/8 (int and long are 32-bit, pointer is 64-bit) 
>    * Win64 API 
> * LP64 or 4/8/8 (int is 32-bit, long and pointer are 64-bit) 
>    * Unix and Unix-like systems (Linux, Mac OS X) 

http://en.cppreference.com/w/cpp/types/integer#Function_macros_for_minimum-width_integer_constants
Macro `UINT64_C(1)` from `stdint.h` should literally interpret `1` to `1UL` or `1ULL`
```c
# if __WORDSIZE == 64
#  define UINT64_C(c)	c ## UL
# else
#  define UINT64_C(c)	c ## ULL
# endif
```

* [dxvk] Fix native build on *nix x86_64 systems

Use explicit template argument instead of 1ull or UINT64_C(1) macro.
2018-04-28 09:08:14 +02:00
pchome
78e8621d09 [clang-tidy] performance-for-range-copy fix (#322)
https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
2018-04-28 01:14:57 +02:00
Philip Rebohle
1784b8c44d [d3d11] Merge interop API 2018-04-26 22:20:09 +02:00
Philip Rebohle
8cb3a266f7 [dxvk] Fix potential state tracking issue when updating render targets 2018-04-26 18:43:19 +02:00
Philip Rebohle
962a7f5766 [dxvk] Ignore redundant render target bindings
Further reduces render pass count if applications bind render targets
without using them, and then bind the old set of render targets again.
2018-04-26 15:30:18 +02:00