Philip Rebohle
b51fd4d06c
[d3d11] Add range checking to IAGetVertexBuffers
2021-04-22 12:56:11 +02:00
Philip Rebohle
a13dad07cc
[d3d11] Add some missing STDMETHODCALLTYPE declarations
2021-04-22 12:56:11 +02:00
Liam Middlebrook
fb0b11903b
[d3d11] Implement D3D11UserDefinedAnnotation
...
Reviewed-by: Oleg Kuznetsov <okouznetsov@nvidia.com>
2021-04-08 14:25:02 +02:00
Philip Rebohle
c3feea2bce
[dxvk] Make samplerAnisotropy feature optional
2021-04-04 20:01:30 +01:00
Philip Rebohle
0a787683b6
[dxvk] Don't require shaderStorageImageExtendedFormats
...
No real reason to, not sure why we did this in the first place.
2021-04-04 20:01:30 +01:00
Philip Rebohle
2f553b5b16
[d3d11] Implement conservative rasterization
...
Needed for Nvidia ShadowLibs in Final Fantasy XV.
2021-03-13 20:22:32 +01:00
Philip Rebohle
e3b92bcfac
[dxvk] Add conservative rasterization mode to rasterizer state
2021-03-13 20:22:32 +01:00
Philip Rebohle
3acdf6e22a
[d3d11] Perform bound-checking in GetBufferSlice
...
Ensures that we don't pass invalid buffer slices to the backend.
2021-03-04 17:37:13 +01:00
Philip Rebohle
049fda9218
[d3d11] Revert index buffer optimization
...
This causes some problems when the app uses a combination of index
buffer offset and StartIndexLocation that overflows 32-bit integers.
In my testing, there haven't been many games benefitting from this
optimization anyway, so just reverting it should not have tangible
effects on performance.
2021-03-04 15:47:39 +01:00
Joshua Ashton
0367bf95c4
[build] MSVC check cleanup
2021-03-03 18:57:42 +01:00
Philip Rebohle
148272fbce
[d3d11] Use DxvkSwapchainBlitter for presentation
2021-02-27 14:54:14 +00:00
Philip Rebohle
9c6d3a2bf6
[d3d11] Fix RSGetViewports and RSGetScissorRects
...
If the output array is non-null, these functons always return the
number of valid viewports or scissors actually written to the array.
Fixes a wine test failure.
2021-02-26 03:35:57 +01:00
Philip Rebohle
d118d35820
[d3d11] Fix IAGetIndexBuffer with optimized index buffers
2021-02-26 02:39:14 +01:00
Philip Rebohle
5643bf47fe
[d3d11] Use discardImageView in DiscardView1
2021-02-21 02:51:59 +01:00
Philip Rebohle
5d4d32c613
[d3d11] Remove explicit spec constant for gamma texture
...
No longer needed.
2021-02-21 02:20:14 +01:00
Philip Rebohle
ab3de5e94b
[d3d11] Manually discard swap chain image view on present
2021-02-21 02:19:23 +01:00
Philip Rebohle
bce80b523f
[d3d11] Mark images as shared if necessary
2021-02-14 04:00:02 +01:00
Philip Rebohle
2787ba8450
[d3d11] Fix D3D11 bind flags and DXGI usage for swap chain images
2021-02-12 03:12:48 +01:00
Philip Rebohle
c98c5f5d17
[d3d11] Add internal DXGI usage flags to textures
...
We need this for swap chain images.
2021-02-12 03:12:48 +01:00
Philip Rebohle
bcadc04932
[dxvk] Validate vertex attribute alignment
2021-02-08 14:55:18 +01:00
Philip Rebohle
a045cac281
[d3d11] Fix vertex input alignment for small formats
...
Fixes #1922 .
2021-02-08 14:28:55 +01:00
Philip Rebohle
307f43ff1e
[d3d11] Introduce option to disable float controls
...
And disable for SotTR since it introduces rendering issues.
2021-01-28 20:32:38 +01:00
Philip Rebohle
8de9dc9378
[d3d11] Enable d3d11.invariantPosition by default
2021-01-28 20:09:47 +01:00
Philip Rebohle
b8bc36559d
[d3d11] Optimize index buffer binding with offset
...
Do not rebind the buffer if only the offset changes. Instead,
adjust StartIndexLocation in indexed draw calls. For indirect
draws, this will be disabled on the fly.
This may save a whole bunch of work in the backend, and reduces
the number of commands being sent to the CS thread in the first
place, which is why this optimization is not being done in the
backend itself but rather on the client API side.
2021-01-24 15:18:38 +01:00
Joshua Ashton
742b52bbb5
[d3d11] Fix device child refs properly
2021-01-15 23:47:48 +01:00
Joshua Ashton
838a6ef0f1
[d3d11] Disallow mismatching shader bytecode and type
...
Fixes a wine test which lead to a "refcounting bug" down the line.
2021-01-08 11:59:16 +01:00
Andrew Eikum
a3065fca8e
[d3d11] Extend interop interfaces for OpenXR support
2021-01-07 23:54:02 +01:00
gofman
5852e318e5
[d3d11] Fix device ref counting from queries. ( #1887 )
...
Fixes AO Tennis 2 crash on exit.
Co-authored-by: Paul Gofman <pgofman@codeweavers.com>
2021-01-06 20:10:44 +01:00
oltolm
f337ad3c05
fix d3d11 header for MinGW 9 ( #1883 )
2021-01-04 00:52:43 +01:00
Philip Rebohle
34e730fe41
[d3d11] Remove predication-related code
2020-11-30 19:18:26 +01:00
Philip Rebohle
f74071ac0a
[d3d11] Support different strides for merged indirect draws
...
Trine 4 uses a stride of 32 bytes. Detecting the stride dynamically
allows us to merge a couple of draws in this game, and others which
do not tightly pack their draw parameter buffers.
2020-11-21 05:39:05 +01:00
Joshie
6a10c81d4b
[d3d11] Define ordinals for exports ( #1812 )
2020-11-11 16:54:36 +01:00
Philip Rebohle
ab04f45ea0
[d3d11] Handle null pointers in CopySubresourceRegion1.
...
Because of course Marvel's Avengers tries to do this..
2020-09-17 13:36:09 +02:00
Robin Kertels
b21a673a8d
[d3d11] Don't use clamped constant buffer range for bounds checking
2020-09-14 22:43:18 +02:00
Philip Rebohle
4801fbe098
[d3d11] Clamp and validate bound constant buffer range
...
SetConstantBuffers will only bind the first 65536 bytes of any
buffer passed to it if it is larger. This can be seen even when
querying the bound range via GetConstantBuffers1.
SetConstantBuffers1 does not have any effect if the bound range
is invalid.
2020-09-14 16:50:16 +02:00
ishitatsuyuki
bb85a4caa8
Handle non-ASCII characters properly in paths
2020-09-10 15:56:38 +02:00
Philip Rebohle
7bf02a1925
[d3d11] Fix incorrect layer count for some non-PoT 3D RTVs
...
Otherwise, we may end up with zero layers. Fixes #1756 .
2020-09-04 23:04:06 +02:00
Philip Rebohle
66814ea8db
Revert "[d3d11] Move D3D11Shader implementation to its own file"
...
Useless since it doesn't fix the clang problem.
2020-07-18 00:10:31 +02:00
Philip Rebohle
56fe52ca3c
[d3d11] Move D3D11Shader implementation to its own file
...
And resolve some include madness. Necessary because D3D11Shader::GetDevice
needs to know the full definition of D3D11Device, but D3D11Device needs
to know the full definition of the other shader-related classes.
2020-07-17 10:16:37 +02:00
Philip Rebohle
5ab12d9668
[d3d11] Reenable null descriptor feature
2020-07-10 16:59:20 +02:00
Philip Rebohle
2cac70fbb6
[d3d11] Require transform feedback for FL10_0 and newer
...
This has been supported in drivers for one and a half years at this
point, so it should be safe to make it a hard requirement.
2020-05-30 16:02:22 +02:00
Joshua Ashton
7cd46e72e9
[dxvk] Add filter type to generateMipmaps
2020-05-27 10:12:43 +02:00
Philip Rebohle
57acbbd7c7
[d3d11] Always enable STORAGE_BUFFER_BIT usage for srv/uav buffers
...
Fixes validation errors in games that use incorrect view types in
some cases, e.g. Cloudpunk.
2020-05-12 00:23:12 +02:00
Philip Rebohle
aa0b306d2e
[d3d11] Require multiDrawIndirect feature for Feature Level 11.0
...
All hardware that DXVK can run on supports this, so let's just enable it.
Saves some feature checks in games using Ubisoft's Anvil Next engine.
2020-05-11 01:15:06 +02:00
Philip Rebohle
00613d1dc7
[d3d11] Enable custom border color features if available
2020-05-04 19:46:57 +02:00
DadSchoorse
9b602ef850
[util] Rework tearFree as a Tristate
...
PR #1606 .
2020-05-02 10:18:13 +02:00
Philip Rebohle
c9dde91760
[d3d11] Disable null descriptors again
...
Breaks ELEX due to incorrect image query results.
2020-05-02 01:02:46 +02:00
Philip Rebohle
f1e069568d
[build] Remove .spec files
...
No longer needed now that we don't support winelib builds anymore.
2020-05-01 00:52:33 +02:00
Philip Rebohle
6face8a1dc
[d3d11] Enable new robustness features if available
2020-04-30 16:36:59 +02:00
Philip Rebohle
80009831d4
[d3d11] Use explicit spec constant for gamma texture
...
With null descriptors, the "bound" spec constants would always be 1.
2020-04-30 16:36:59 +02:00
Philip Rebohle
9a76645228
[d3d11] Simplify ClearView implementation
...
Removes some code duplication for the no-clear-rect case.
2020-04-22 22:32:53 +02:00
Philip Rebohle
b3c19ba5e8
[d3d11] Optimize ClearView for render target and depth-only views
...
We should use clearRenderTarget whenever we clear the entire view.
The Talos Principle uses ClearView to clear its render targets for
some reason, and we were hitting a slow path there.
2020-04-22 21:02:46 +02:00
Robin Kertels
d6e1c19fec
[d3d11] Ignore buffer usage for the single use mapping hack
...
The usage doesn't matter as we swap out the entire backing slice anyway.
2020-04-18 17:15:48 +02:00
Philip Rebohle
8c68236f70
[d3d11] Check return value of Map in UpdateSubresource1
...
And fall back to a GPU-side copy if necessary.
2020-04-18 17:04:16 +02:00
Philip Rebohle
4d8940957c
[d3d11] Add option to enforce mailbox present mode
2020-04-12 20:28:33 +02:00
Philip Rebohle
a9b6421f60
[d3d11] Support signaling event in Flush1
2020-03-19 23:38:28 +01:00
Philip Rebohle
bf480ce659
[d3d11] Initialize all D3D11ContextState members
...
Otherwise, SwapDeviceContextState may swap in some uninitialized data.
Closes #1512 .
Reported-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
2020-03-16 18:42:57 +01:00
Philip Rebohle
ba213c1fa0
[dxvk] Factor out waiting for resource to become idle
...
And use the new generic spin function to reduce syscall spam.
2020-03-15 03:43:04 +01:00
Philip Rebohle
7b760800b4
[d3d11] Fix buffer view compatibility check
2020-03-08 01:28:51 +01:00
Philip Rebohle
2291484696
[d3d11] Fix texture view compatibility check
2020-03-08 01:28:51 +01:00
Joshua Ashton
74d23c22de
[build] Use __CRT_UUID_DECL for uuid definitions
...
Closes #1463
2020-02-18 20:25:05 +01:00
Philip Rebohle
4aa6800e95
[d3d11] Validate subresource index in copy operations
...
Rocket League tries to copy five subresources of a texture that only
has one single array layer and one single mip map, which causes GPU
hangs on Nvidia drivers.
2020-02-13 00:39:55 +01:00
Philip Rebohle
76a6f6eab9
[dxbc] Add option to force memory barriers after shared memory stores
2020-02-08 00:48:42 +01:00
Philip Rebohle
c560ec44b5
[d3d11] Re-introduce client API HUD item
2020-01-28 16:32:58 +00:00
Philip Rebohle
be16da37d7
[d3d11] Introduce COM interface to set and get API version
...
Allows us to identify DirectX 10 applications correctly.
2020-01-28 16:32:58 +00:00
Philip Rebohle
588beb5b2f
[hud] Don't initialize client API HUD item by default
...
Removes the client API property from the DXVK device as well.
Instead, client APIs should create the HUD item manually.
2020-01-28 16:32:58 +00:00
Philip Rebohle
3beca254e2
[dxvk] Move UMA check to backend
2020-01-28 16:31:34 +00:00
Philip Rebohle
9721938e57
[d3d11] Introduce d3d11.invariantPosition option
...
Apparently it's better to make app profiles than risk tanking
performance for all applications. Invariance rules in D3D11 are
undocumented so it's not clear what the correct solution is.
2020-01-23 01:28:19 +01:00
Philip Rebohle
a57dc75247
[d3d11] Implicitly begin scoped queries in End if necessary
...
Matches (undocumented) D3D11 behaviour. Warriors Orochi 4 runs into
this because it does not begin some of its timestamp disjoint queries
before ending them and retrieving data.
2020-01-22 04:17:13 +01:00
Philip Rebohle
4923bc20f7
[dxvk] Don't enable VK_KHR_shader_draw_parameters
...
Core in Vulkan 1.1.
2020-01-17 17:46:59 +01:00
Philip Rebohle
073669b7e7
[dxvk] Don't enable VK_KHR_maintenance1, VK_KHR_maintenance2
...
Core in Vulkan 1.1.
2020-01-17 17:46:59 +01:00
Philip Rebohle
18450f4643
[d3d11] Lock immediate context when submitting presentation commands
...
Otherwise, a race condition occurs if a game submits rendering commands
at the same time as presenting the swap chain image. Only works if
multithreaded protection is enabled, but according to MSDN, it is
illegal to use DXGI commands and the immediate context in parallel.
Fixes stability issues in Tales of Vesperia.
2020-01-15 23:48:58 +01:00
Joshua Ashton
3cfc16ea34
[d3d11] Move shader stage and buffer slot calc to inside lambda
...
Take advantage of the fact that template permutations transfer into lambdas inside of them.
Removes some unnecessary captures.
2020-01-08 23:09:53 +01:00
Philip Rebohle
ae01bd8bd4
[dxgi] Ignore sync interval if PRESENT_TEST is used
...
Otherwise, the following sequence leads to the Vulkan
swap chain being recreated once per frame:
swapchain->Present(0, DXGI_PRESENT_TEST);
swapchain->Present(1, 0);
Found while investigating #1314 .
2020-01-04 11:18:51 +01:00
Philip Rebohle
3db00a0f40
[d3d11] Increment transfer command counter when initializing UAV counter
...
Otherwise, we won't clear the counter before it is being used if there are
no other transfer commands recorded to the initializer command buffer.
2020-01-03 13:44:23 +01:00
Philip Rebohle
aa40decc23
[d3d11] Don't present if the presenter has no swap chain.
...
Also fixes DXGI_PRESENT_TEST handling for zero-sized windows.
2019-12-15 11:38:57 +01:00
Philip Rebohle
ae7189f9a4
[d3d11] Update HUD on CS thread
...
Otherwise, we may end up reading some bollocks since the CS thread
might not have finished processing the entire frame yet.
2019-12-13 15:02:45 +01:00
Philip Rebohle
2689204d74
[hud] Enable manual sRGB conversion for non-sRGB swap chains
...
We still blend in the wrong color space, but text should be a bit
more readable in some games now.
2019-12-13 14:03:00 +01:00
Philip Rebohle
945a64252d
[d3d11] Determine exclusive fullscreen mode based on swap chain flags
2019-12-05 13:11:06 +01:00
Philip Rebohle
575a267f07
[vulkan] Support exclusive fullscreen control in presenter
2019-12-05 13:10:11 +01:00
Philip Rebohle
9c26fad40e
[vulkan] Add feature bit for exclusive fullscreen control
2019-12-05 13:05:54 +01:00
Philip Rebohle
07c2de62be
[d3d11] Silence some errors about invalid API usage on deferred contexts
...
Halo MCC apparently spams calls to GetData on deferred contexts, which
is obviously illegal.
2019-12-04 20:18:51 +01:00
Philip Rebohle
27ea176295
[d3d11] Remove d3d11.strictDivision option
2019-11-30 20:39:32 +01:00
Philip Rebohle
3b030d9569
[dxbc] Implement workaround to replace NaN render target outputs by zero
2019-11-30 20:39:32 +01:00
Philip Rebohle
c9c6b1886b
[d3d11] Synchronize presentation when destroying swap chain
...
Otherwise, we might destroy the presenter before the CS thread
actually issues the present operation, and the waitForIdle has
not the desired effect.
2019-11-26 23:51:31 +01:00
Philip Rebohle
9785fba66e
[dxgi] Implement IDXGISwapChain2::GetFrameLatencyWaitableObject
2019-11-26 16:54:52 +01:00
Philip Rebohle
65cc8c2b31
[d3d11] Create frame latency event for swap chain
...
Needed in order to support the DXGI 1.3 frame latency API.
2019-11-26 16:54:52 +01:00
Philip Rebohle
ef37b5fed6
[dxgi] Implement IDXGISwapChain2::SetFrameLatency
2019-11-26 16:11:46 +01:00
Philip Rebohle
2d1fb52b2f
[util] Reimplement Signal
...
The new implementation is more akin to D3D12 fences or timeline
semaphores, and should make implementing similar concepts easier.
2019-11-26 16:11:46 +01:00
Philip Rebohle
69bad7bf8c
[d3d11] Move frame latency handling into D3D11SwapChain
2019-11-26 16:11:46 +01:00
Joshua Ashton
7e3142b2ed
[d3d11] Hook up platform-specific clock
...
See 89dfa2bc22
2019-11-26 01:52:58 +01:00
Philip Rebohle
25a1e0d355
[d3d11] Actually fix subresources discarded by DiscardView1
2019-11-24 00:34:15 +01:00
Philip Rebohle
53fca5143f
[d3d11] Ignore D3D11_COPY_DISCARD
...
Various truck simulations are broken and set this on every
CopySubresourceRegion call, which, if we were to implement
DiscardBuffer for non-mappable resources again, would break
them. This flag seemingly has no effect on native D3D11.
2019-11-24 00:08:06 +01:00
Philip Rebohle
a7c21a617c
[d3d11] Overhaul DiscardResource and DiscardView implementations
...
For host-visible resources, these behave like MAP_DISCARD.
Euro Truck Simulator 2 and friends relies on this (see #1250 ).
2019-11-23 23:57:07 +01:00
Philip Rebohle
6b3d60ab25
[dxvk] Enable asynchronous presentation on all hardware
...
...and remove the dxvk.asyncPresent option.
2019-11-19 23:34:24 +01:00
Philip Rebohle
ceddbaf7c4
[dxvk] Fix synchronization around vkDeviceWaitIdle
...
From the spec:
"Host access to all VkQueue objects created
from device must be externally synchronized"
We were not doing that, which could cause hangs and
all sorts of issues when recreating the swap chain
on Nvidia GPUs.
2019-11-19 23:34:14 +01:00
Philip Rebohle
c7718e5952
[d3d11] Zero-initialize UAV counters
...
Fixes a hang in Dirt Rally on RADV.
2019-11-18 18:40:39 +01:00
Philip Rebohle
73a5b33375
[d3d11] Also fix reset counter memory order for deferred context queries
2019-11-15 19:48:41 +01:00
Philip Rebohle
c24dad75dc
[d3d11] Remove allowMapFlagNoWait option
2019-11-15 11:09:11 +01:00
Philip Rebohle
dbc14fe65c
[d3d11] Fix memory order for query reset counter
...
Probably doesn't change anything, but let's fix it anyway.
2019-11-14 23:43:58 +01:00
Philip Rebohle
a6483e02fe
[d3d11] Submit stalling event queries before flushing
...
Otherwise, instead of preventing syncs, this would actually
have the opposite effect.
2019-11-14 22:57:30 +01:00
Philip Rebohle
420d95e396
[dxvk] Store shader capability information in separate set of flags
2019-11-12 18:05:03 +01:00
Philip Rebohle
31baf3529a
[d3d11] Fix uninitialized DSV flags
...
Fixes #1242 .
2019-11-10 15:02:21 +01:00
Philip Rebohle
77574d9970
[d3d11] Don't query DXVK instance from adapter
2019-11-08 11:25:58 +01:00
Philip Rebohle
b2317cad4d
[dxvk] Pass DXVK instance to DXVK device directly, not through the adapter
2019-11-08 11:17:02 +01:00
Philip Rebohle
a0dba6bbf9
[d3d11] Hold reference to DxvkInstance
...
Hack to keep the instance alive which owns the adapters. Should
fix #1240 for now, but we should fix this properly later on.
2019-11-07 20:21:27 +01:00
Philip Rebohle
1d961b7dc3
[d3d11] 'a' is not a very good name for a variable
2019-11-04 13:46:18 +01:00
Philip Rebohle
77a0cb2b19
[d3d11] Don't synchronize with CS thread on present
...
Instead, submit from the CS thread in order to prevent out-of-order
submissions. Improves minimum FPS in Final Fantasy XIV by 5-10%.
2019-11-02 17:53:17 +01:00
Philip Rebohle
d96c22be05
[d3d11] Do not synchronize with CS thread in GetData
...
Instead, use a counter to determine whether there are any
pending operation for the query on the CS thread.
2019-11-02 17:53:17 +01:00
Philip Rebohle
0924bb469c
[d3d11] Move query state tracking to immediate context implementation
2019-11-02 17:53:17 +01:00
Philip Rebohle
be5dc234c1
[d3d11] Move common Begin/End implementation to immediate context
2019-11-02 13:48:03 +01:00
Philip Rebohle
63dbca82e7
[d3d11] Track used queries in deferred contexts and command lists
2019-11-02 13:48:03 +01:00
Philip Rebohle
0671007437
[d3d11] Only execute Begin for scoped queries
2019-11-02 13:48:03 +01:00
Philip Rebohle
1780c549e5
[d3d11] Only add storage buffer usage flag to constant buffers if needed
...
Otherwise, the backend optimization for dynamic uniform buffers will not
kick in.
2019-10-30 10:58:05 +01:00
Philip Rebohle
e95bc3256f
[d3d11] Move handling of constantBufferRangeCheck option to D3D11Options
2019-10-30 10:57:36 +01:00
Philip Rebohle
9e084e63ca
[d3d11] Remove useless members from D3D11DeferredContextMapEntry
2019-10-30 00:44:17 +01:00
Philip Rebohle
3d213efe53
[dxbc] Use SSBOs for dynamically indexed constant buffers if needed
...
SSBOs are tightly bound-checked on all Nvidia GPUs, so this allows for
a more accurate workaround for games relying on OOB access behaviour.
2019-10-28 15:42:46 +01:00
Philip Rebohle
a2b629415e
Revert "[d3d11] Fix ref counting for D3D11CommandList"
...
This reverts commit 55bae45915
.
2019-10-27 11:10:49 +01:00
Philip Rebohle
fc0ede0657
Revert "[d3d11] Recycle command lists from deferred contexts"
...
This reverts commit 4e3da45fde
.
For some reason this caused crashes.
2019-10-27 11:00:59 +01:00
Philip Rebohle
20f79a754b
[d3d11] Adjust buffer memory flags if apitrace is attached
...
Using cached memory speeds up apitrace significantly as it
reads back mapped memory regions.
2019-10-26 22:56:47 +02:00
Philip Rebohle
0683f4f2c0
[d3d11] Remove D3D11 counter buffer class
2019-10-26 17:44:29 +02:00
Philip Rebohle
e967c52ff7
[d3d11] Allocate predicate buffer per query
...
Allows us to get rid of the D3D11 counter buffer class.
2019-10-26 17:44:29 +02:00
Philip Rebohle
09f507c284
[d3d11] Allocate xfb counter buffer per buffer
...
Same idea as with UAV counters, allows for more efficient updates.
2019-10-26 17:44:29 +02:00
Philip Rebohle
191c9644af
[d3d11] Allocate counter buffer per UAV
...
Might slightly increase memory overhead, however this allows
the backend to execute UAV counter updates more efficiently.
2019-10-26 17:44:29 +02:00
Philip Rebohle
4e3da45fde
[d3d11] Recycle command lists from deferred contexts
...
Can save a few memory allocations and deallocations at runtime.
2019-10-25 23:09:21 +02:00
Philip Rebohle
55bae45915
[d3d11] Fix ref counting for D3D11CommandList
2019-10-25 21:37:18 +02:00
Philip Rebohle
41f04ffb61
[d3d11] Fix incorrect AddRef return value
2019-10-25 21:36:21 +02:00
Philip Rebohle
f9c2e43ffc
[d3d11] Don't set HOST pipeline stage and access flags for resources
...
The backend does not and will not use that information at all.
2019-10-24 16:57:06 +02:00
Philip Rebohle
ee77afb6af
[d3d11] Validate shader module capabilities
...
Only create a shader module if the device actually supports
the required features. Apparently this is needed for some
Unity Engine games.
2019-10-21 12:10:05 +02:00
Philip Rebohle
ddf010479d
[d3d11] Refactor shader module creation
2019-10-21 12:09:53 +02:00
Philip Rebohle
d899bd2d76
[d3d11] Remove obsolete DefaultDesc methods from state classes
2019-10-14 05:28:46 +02:00
Philip Rebohle
68c257fc0d
[d3d11] Fix ref counting for state objects bound to a context
...
Using raw pointers is safe here since the objects never get destroyed
during the lifetime of the context.
2019-10-14 02:06:33 +02:00
Philip Rebohle
1282c2b99e
[d3d11] Fix immediate context reference counting
...
Fixes various wine test failures.
2019-10-14 01:56:34 +02:00
Philip Rebohle
4d0cc3e24e
[d3d11] Don't subclass state objects from ComObject
...
These override reference counting, so we shouldn't use ComObject.
2019-10-14 01:44:37 +02:00
Philip Rebohle
c5c43fb2a4
[d3d11] Allow choosing type wrapper for D3D11DeviceChild base class
...
Allows subclasses to replace ComObject with something else.
2019-10-14 01:44:27 +02:00
Philip Rebohle
dd9a55ecc0
[util] Don't allow multiple inheritance for COM objects
...
This never made any sense whatsoever in the first place.
2019-10-14 01:42:24 +02:00
Philip Rebohle
c281e76bac
[d3d11] Don't get private references for state objects
...
Otherwise we will end up deleting the objects even though they
aren't explicitly heap-allocated. Whoops...
2019-10-14 01:39:54 +02:00
Philip Rebohle
9c6209fbf5
[d3d11] Fix reference counting for state objects
...
Fixes various wine test failures. Also, state objects are now
allocated in the hash map itself rather than a wrapped COM object.
2019-10-14 01:27:59 +02:00
Philip Rebohle
accbc8828c
[d3d11] Return error if no desc is provided for Create*State methods
...
Fixes wine test failures.
2019-10-14 01:08:31 +02:00
Philip Rebohle
bd58f1a913
[d3d11] Don't sync CS thread if resource to map is already in use
...
SynchronizeCsThread can only update the in-use state from available
to in-use, so doing this on a resource that is already in-use is not
necessary. May improve performance in combination with DO_NOT_WAIT.
2019-10-14 00:14:00 +02:00
Philip Rebohle
12f0f8b13f
[d3d11] Don't use a state object for default blend state
2019-10-13 23:15:23 +02:00
Philip Rebohle
c30fd8fb97
[d3d11] Don't use a state object for default depth-stencil state
2019-10-13 23:15:23 +02:00
Philip Rebohle
b0231403fe
[d3d11] Don't use a state object for default rasterizer state
2019-10-13 23:15:23 +02:00
Philip Rebohle
a89c662984
[d3d11] Introduce ResetState and use it for ClearState
...
ClearState gets used a lot in games that use deferred
contexts, so we should make sure it's fast. Since we
apply default state everywhere, there is no need to
perform any expensive RestoreState operations.
Reduces the amount of time spent on ClearState on the
CS thread by ~40%, and by ~90% on the calling thread.
2019-10-13 23:15:23 +02:00
Philip Rebohle
8446c28de1
[dxvk] Remove spill parameter from bindRenderTargets
...
No longer needed.
2019-10-13 01:44:31 +02:00
Philip Rebohle
102a18060e
[d3d11] Don't spill render pass when rebinding render targets
...
The backend handles this now, so it's no longer necessary.
2019-10-13 01:44:31 +02:00
Philip Rebohle
3a39027987
[d3d11] Add more rigid validation for buffer creation
...
Fixes several wine test failures.
2019-10-11 17:32:46 +02:00
Philip Rebohle
762df0bedf
[d3d11] Change ValidateBufferProperties to NormalizeBufferProperties
2019-10-11 17:23:02 +02:00
Philip Rebohle
127e037627
[d3d11] Validate texture array size
...
Fixes a wine test failure and possibly prevents invalid Vulkan API usage.
2019-10-11 17:11:01 +02:00
Philip Rebohle
554b77b47a
[d3d11] Initialize feature level to zero in D3D11CreateDevice
...
Fixes a wine test failure.
2019-10-11 17:01:23 +02:00