Philip Rebohle
e82c87dc52
[d3d11] Implement GetDC / ReleaseDC
2019-09-20 01:44:18 +02:00
Philip Rebohle
028633138a
[d3d11] Implement GDI surface
2019-09-20 01:44:18 +02:00
Joshua Ashton
014870b1ff
[util] Add helpers for GDI/DDI interop
2019-09-20 01:44:18 +02:00
Philip Rebohle
c9a0f06ff4
[d3d11] Enable allowMapFlagNoWait by default
...
We still keep the option around so that in case of regressions,
users can check if disabling this option fixes their issue.
2019-09-20 01:44:02 +02:00
Philip Rebohle
e9fcf64a8c
[dxvk] Only wait for writes when mapping with D3D11_MAP_READ
2019-09-20 01:44:02 +02:00
Philip Rebohle
5b5927dd41
[dxvk] Implement read-write tracking for resources
2019-09-20 01:44:01 +02:00
Philip Rebohle
63183141bc
[dxvk] Implement read/write tracking in lifetime tracker
...
This way we will be able to more accurately determine how a
resource is going to be used by the GPU, and we can also cut
unnecessary atomic operations for non-resource objects.
2019-09-20 01:44:01 +02:00
Philip Rebohle
136ad3e4c9
[d3d11] Write to image memory directly in InitHostVisibleTexture
...
Avoids performing a potentially expensive copy or clear operation
on the GPU.
2019-09-20 01:44:01 +02:00
Philip Rebohle
ae4a5232aa
[d3d11] Use VK_IMAGE_LAYOUT_PREINITIALIZED for mapped images
...
This way we can directly write image data directly to the image
without having to do it on the GPU.
2019-09-20 01:44:01 +02:00
Philip Rebohle
eb0a492f51
[dxvk] Add initial layout to initImage
...
Allows us to initialize an image from the PREINITIALIZED layout.
2019-09-20 01:44:01 +02:00
Philip Rebohle
4570b34456
[dxvk] Add initial layout to image create info
2019-09-20 01:44:01 +02:00
Philip Rebohle
51c6eb5cdb
[util] Enable FIFA 19 workaround for FIFA 20 as well
...
Same procedure as every year.
2019-09-20 00:50:01 +02:00
Philip Rebohle
48417c7d19
[d3d11] Implement DiscardView1
...
Basically just behave like DiscardView if no rects are passed to
the function, otherwise ignore the call since we can't discard
individual rectangles in any meaningful way.
2019-09-19 13:56:50 +02:00
Philip Rebohle
0338b70596
[dxgi] Implement IDXGIVkInteropAdapter for IDXGIAdapter
2019-09-18 14:53:44 +02:00
Philip Rebohle
9af8387e4e
[dxgi] Define IDXGIVkInteropAdapter interface
...
Can be used to pull the Vulkan instance and physical device from
a DXGI adapter.
2019-09-18 14:53:44 +02:00
Philip Rebohle
9e02b6b433
[dxgi] Rename IDXGIVkAdapter -> IDXGIDXVKAdapter
...
This interface exposes DXVK internals and cannot be used for
Vulkan interop. We shouldn't pretend like it could.
2019-09-18 14:07:13 +02:00
Philip Rebohle
bc853d0e48
[d3d11] Only use mapped buffer for images if bind flags are non-zero
...
We really shouldn't use the intermediate buffer for DYNAMIC images
that can only ever be used for copy commands, since the copies will
be redundant.
2019-09-18 13:15:22 +02:00
Philip Rebohle
65428da3fe
[util] Enable allowMapFlagNoWait for Warhammer II
2019-09-18 13:14:53 +02:00
Philip Rebohle
abf89356cd
[d3d11] Report unified memory if all heaps are device-local
...
Together with mapping default resources, this may or may not
help performance in some applications on integrated graphics.
2019-09-17 23:52:02 +02:00
Philip Rebohle
518d06b9c2
[d3d11] Enable D3D11.3 MapOnDefaultTextures feature
2019-09-17 23:39:06 +02:00
Philip Rebohle
c59ab258a5
[d3d11] Implement ReadFromSubresource and WriteToSubresource
2019-09-17 23:39:06 +02:00
Philip Rebohle
e764f05a1a
[d3d11] Allow pMappedResource to be null when mapping images
...
This is required to implement mapping default textures correctly.
2019-09-17 23:39:06 +02:00
Philip Rebohle
6ce8450b12
[d3d11] Implement D3D11.2 MapOnDefaultBuffers feature
...
Basically just allocates the buffer on a host-visible memory
type, like DYNAMIC or STAGING buffers depending depending on
the CPU access flags.
2019-09-17 17:47:33 +02:00
Philip Rebohle
2cdbe2e6df
[d3d11] Move GetMemoryFlagsForUsage into D3D11Buffer
...
D3D11Buffer is the only user of this function and the code sharing
potential is limited. This allows us to implement the memory type
selection for buffers in one single place rather than two.
2019-09-17 17:21:10 +02:00
Philip Rebohle
f7b311499c
[d3d11] Query format support in d3d11-formats test
...
Because why not. Knowing about native d3d11 feature support never hurts.
2019-09-17 16:34:41 +02:00
Philip Rebohle
dda89a075e
[d3d11] Report MapOnDefaultTextures feature as unsupported
...
Bad things can happen if we leave this undefined.
2019-09-17 14:21:19 +02:00
Joshua Ashton
ebc394218a
[dxvk] Replicate R component of border color for depth compare samplers ( #1194 )
...
Only the red component matters for these samplers -- this lets us pick the best colour based on that alone, as we could get garbage data that doesn't matter in the other components.
2019-09-17 11:15:09 +02:00
Philip Rebohle
2ef34a055d
[d3d11] Implement ID3D11Device5
2019-09-16 16:37:37 +02:00
Philip Rebohle
56daf44d4c
[d3d11] Implement ID3D11Device4
2019-09-16 16:26:18 +02:00
Philip Rebohle
3ba541fde6
[d3d11] Implement D3D11.4 feature queries
2019-09-16 16:22:52 +02:00
Philip Rebohle
6ab6b4a209
[d3d11] Include D3D11.4 headers
2019-09-16 16:14:47 +02:00
Philip Rebohle
fdf560150f
[d3d11] Implement ID3D11Device3
2019-09-16 16:13:34 +02:00
Philip Rebohle
b0f6655b92
[d3d11] Implement ID3D11Query1
2019-09-16 16:13:34 +02:00
Philip Rebohle
84c80a4aaf
[d3d11] Implement ID3D11UnorderedAccessView1
2019-09-16 16:13:34 +02:00
Philip Rebohle
81935e1684
[d3d11] Implement ID3D11ShaderResourceView1
2019-09-16 14:27:44 +02:00
Philip Rebohle
345f8694e8
[d3d11] Implement ID3D11RenderTargetView1
2019-09-16 14:27:44 +02:00
Philip Rebohle
0758f14a35
[d3d11] Implement ID3D11Texture2D1 and ID3D11Texture3D1
2019-09-16 14:27:44 +02:00
Philip Rebohle
d9f409b92f
[d3d11] Implement ID3D11RasterizerState2
2019-09-16 13:41:31 +02:00
Philip Rebohle
f9d9307a28
[d3d11] Implement ID3D11DeviceContext4
2019-09-16 13:41:31 +02:00
Philip Rebohle
0599a82dee
[d3d11] Implement ID3D11DeviceContext3
2019-09-16 13:41:31 +02:00
Philip Rebohle
17a6c4168e
[dxbc] Implement stencil ref export from fragment shaders
...
This is an optional feature in D3D11.3, but easy enough to support.
2019-09-16 12:42:15 +02:00
Philip Rebohle
b7bc51c3bd
[d3d11] Use shaderStorageImageReadWithoutFormat for typed UAV loads
2019-09-16 12:42:15 +02:00
Philip Rebohle
7fae4a41e8
[d3d11] Add definitions for feature levels 12_0 and 12_1
...
Mostly useful for debugging as we're not going to support these
feature levels for now.
2019-09-16 12:42:14 +02:00
Philip Rebohle
51ff65fbc5
[d3d11] Implement D3D11.3 feature queries
2019-09-16 12:42:14 +02:00
Philip Rebohle
aad44458f7
[d3d11] Include D3D11.3 headers
2019-09-16 12:42:14 +02:00
Philip Rebohle
26afaba410
[dxbc] Implement MSAD4 instruction
...
Apparently we're required to support this for Direct3D 11.2+.
There are currently no known games that require this instruction.
2019-09-16 12:42:14 +02:00
Philip Rebohle
72a356fe01
[d3d11] Implement GetResourceTiling
...
When called on a regular resource, native D3D11 will zero
out the return values. We should match this behaviour.
2019-09-16 12:42:14 +02:00
Philip Rebohle
7ba7178d14
[d3d11] Implement ID3D11Device2
...
Adds some extra validation to resource creation so that
apps cannot accidentally create tiled resources.
2019-09-16 12:42:14 +02:00
Philip Rebohle
c1a7243811
[d3d11] Implement ID3D11DeviceContext2
...
We don't support tiled resources nor markers for now.
Marker support could be added through debug layers.
2019-09-16 12:42:14 +02:00
Philip Rebohle
6e28ab956d
[d3d11] Implement D3D11.2 feature queries
2019-09-16 12:42:14 +02:00