Derek Lesho
66bcc4b3d8
Use std::string for util::getEnvVar input
...
This allows cleaner code when implementing DXVK as a native library
2018-11-16 06:43:45 +01:00
Philip Rebohle
0b7e114cb0
[dxgi] Implement IDXGIDevice3
2018-11-15 17:08:36 +01:00
Philip Rebohle
1724d51079
[dxgi] Refactor presenter creation
...
This change is needed to support non-D3D11 presenters in our DXGI code.
2018-11-12 11:39:34 +01:00
Philip Rebohle
0cfa5b16d3
[d3d11] Support R11G11B10 format in ClearUnorderedAccessViewUint
...
Silences an error message in Shadow of the Tomb Raider. Does not have
any consequences for this game because it initializes the view to 0.
2018-11-10 18:48:44 +01:00
Philip Rebohle
05856e836b
[d3d11] Don't enable StorageImageReadWithoutFormat feature for FL11_0
...
We don't really need this, although it might be useful in the future.
2018-11-10 11:34:23 +01:00
Philip Rebohle
bd03225c14
[dxbc] Refactor DxbcOptions
...
A bit mask isn't good enough going forward, and we also don't
need application-specific options for now.
2018-11-09 08:41:02 +01:00
Philip Rebohle
ab3ba776e0
[d3d11] Do not re-upload mapped image if it was mapped for reading
2018-11-08 18:51:53 +01:00
Philip Rebohle
4d103aad5d
[d3d11] Allow mapping depth-stencil images for reading
...
This may be needed for The Surge and Lords of the Fallen.
2018-11-08 18:51:47 +01:00
Philip Rebohle
f483bc9633
[d3d11] Add usage flag for meta-pack operations if necessary
...
- Fix depth-stencil format list
2018-11-08 18:51:43 +01:00
Philip Rebohle
81a5e2fa0c
[d3d11] Add helper to find exact mapping for depth-stencil formats
...
This is necessary in situations when we need to get the Vulkan format
that corresponds to the DXGI format rather than the remapped one.
2018-11-08 18:51:43 +01:00
Philip Rebohle
f32aff29fa
[d3d11] Clear compressed images if they do not get initialized
...
This probably makes Quantum Break run even worse, but I don't really
care at this point. Fixes #744 .
2018-11-07 18:41:07 +01:00
Philip Rebohle
d5481ac013
[d3d11] Remove redundant D3D11Buffer::GetSize method
2018-11-02 15:43:46 +01:00
Philip Rebohle
851d9fb726
[general] Remove unnecessary include directories from build files
...
These are no longer needed because dxvk includes consistently
use relative file paths now, instead of global includes.
2018-11-02 14:54:39 +01:00
Philip Rebohle
8054e4a772
[dxvk] Add DXVK context method to transparently flush the command list
...
This is identical to what the D3D11 function did, but having it in this
place will allow us to potentially implement better flush heuristics
based on work done on the CS thread.
2018-11-01 13:24:42 +01:00
Philip Rebohle
36ccd46ae7
[dxvk] Move sampler border color handling to the backend
2018-10-31 21:51:23 +01:00
Philip Rebohle
43ed820be9
[d3d11] Remove state tracking for UAV rendering
...
This scenario is now properly handled by the DXVK state tracker.
2018-10-29 12:12:34 +01:00
Philip Rebohle
5a30110d0f
Revert "[d3d11] Remove some flush points"
...
This reverts commit 5ab6f691ae
.
Apparently this leads to extremely bad frame times on some Nvidia setups.
2018-10-25 20:55:37 +02:00
Philip Rebohle
c9ce09e098
[d3d11] Respect xfb metadata when computing shader hash
...
Closes #733 .
2018-10-25 11:28:02 +02:00
Philip Rebohle
589229f4ca
[dxgi] Query device interface from the presenter
...
Removes the coupling between IDXGISwapChain and IDXGIDevice.
This is necessary because D3D12 devices don't support IDXGIDevice.
2018-10-24 15:54:56 +02:00
Philip Rebohle
7b9726fd93
[d3d11] D3D11Presenter -> D3D11PresentDevice
2018-10-23 15:10:01 +02:00
Philip Rebohle
86e6477e80
[dxgi] Remove unused presenter options
2018-10-23 14:58:57 +02:00
Philip Rebohle
967b276acb
[d3d11] Add COM interface for API-agnostic presenter
2018-10-23 14:58:57 +02:00
Philip Rebohle
64185d9be4
[d3d11] Move some DXGI presenter options to D3D11
2018-10-23 14:58:57 +02:00
Philip Rebohle
8cb4852a61
[d3d11] Add new D3D11 swap chain code
...
- Fix deferred surface creation
2018-10-23 14:58:39 +02:00
Philip Rebohle
5124fd87d5
[d3d11] Implicitly flush when queueing an event query
...
Significantly improves GPU utilization in Quake Champions.
2018-10-17 17:28:47 +02:00
Philip Rebohle
5ecfbd8425
[d3d11] Do not use QueryInterface to get query pointers
...
We're not going to implement counters anyway, so this is
unnecessary overhead.
2018-10-17 17:28:47 +02:00
Philip Rebohle
5ab6f691ae
[d3d11] Remove some flush points
...
These aren't as useful as they may look like since they occur
at render pass boundaries anyway.
2018-10-17 17:28:47 +02:00
Philip Rebohle
f14d17b743
[d3d11] Don't mark context methods as 'final'
2018-10-17 17:28:47 +02:00
Philip Rebohle
11b269efd1
[d3d11] Save a few CPU cycles in Map/MapBuffer
2018-10-16 12:29:04 +02:00
Philip Rebohle
e0e945f724
[d3d11] Show SetPredication message only when the predicate is not NULL
...
Helps determine which games actually use the feature.
2018-10-15 19:35:50 +02:00
Philip Rebohle
6b5aa0b928
Merge branch 'vk_transform_feedback'
2018-10-13 08:00:51 +02:00
Philip Rebohle
8172d347be
Revert "[d3d10] Implement ID3D10Multithread"
...
This reverts commit 55d6eae210
.
We probably don't need it, and the current implementation is broken.
2018-10-12 19:29:52 +02:00
Philip Rebohle
55d6eae210
[d3d10] Implement ID3D10Multithread
2018-10-12 19:06:05 +02:00
Philip Rebohle
6d18efdfc7
[d3d10] Lock device on context operations
...
May fix thread safety issues in some games. Apparently, the
D3D10Device is supposed to be thread safe by default.
2018-10-12 18:31:55 +02:00
Philip Rebohle
406816d17c
[d3d10] Support pOffsets parameter in SOGetTargets
2018-10-10 19:55:42 +02:00
Philip Rebohle
93a851a2fc
[d3d11] Implement DrawAuto method
2018-10-10 19:55:42 +02:00
Philip Rebohle
44024e7a7a
[d3d11] Implement Stream Output queries
2018-10-10 19:55:42 +02:00
Philip Rebohle
93753a5ce7
[d3d11] Bind transform feedback buffers in SOSetTargets
2018-10-10 19:55:41 +02:00
Philip Rebohle
97d776cc00
[d3d11] Allocate counter for stream output buffers
2018-10-10 19:55:41 +02:00
Philip Rebohle
0d89dfae95
[d3d11] Report format support for stream output buffers
2018-10-10 19:55:41 +02:00
Philip Rebohle
7369dee9d6
[d3d11] Create passthrough geometry shader if necessary
...
Fixes stream output in Unity Engine titles.
- Fix compilation with new DxbcProgramInfo struct.
2018-10-10 19:55:41 +02:00
Philip Rebohle
5463dc7e6c
[d3d11] Implement CreateGeometryShaderWithStreamOutput
...
- Emit error instead of warning when enabling rasterization
2018-10-10 19:55:26 +02:00
Philip Rebohle
f42ea9f1d1
[d3d11] Set transform feedback usage, stage and access flags
2018-10-10 13:05:38 +02:00
Philip Rebohle
989a10ab88
[dxvk] Enable transform feedback device feature if available
...
- Enable geometryStreams feature
2018-10-10 13:05:37 +02:00
Philip Rebohle
a42f03e32d
[dxbc] Add Xfb structures to DxbcModuleInfo
2018-10-10 10:28:15 +02:00
Philip Rebohle
08b241b3ea
[d3d11] Add option to disable deferred context mapping speed hack
...
Fixes a regression in The Evil Within.
We should probably find a proper solution, but for now this is the best
thing we can do for games which reuse command lists.
2018-10-09 17:07:50 +02:00
Philip Rebohle
781ee00f5c
[dxvk] Refactor indirect draw/dispatch commands
...
Introduces an OpenGL-style bind point for the argument buffer, which
means we can avoid a lot of unnecessary reference tracking in games
that do a lot of indirect draw calls.
Reduces CPU overhead in Assassin's Creed Odyssey.
2018-10-08 10:23:18 +02:00
Philip Rebohle
0b4f1b6d6f
[d3d11] Implement DiscardView and DiscardResource for images
2018-10-01 16:54:34 +02:00
Philip Rebohle
da8274daaf
[d3d11] Don't set meta-resolve usage flags for depth buffers
...
Depth buffers cannot be resolved in D3D11.
May improve performance on some hardware when MSAA is used.
2018-09-29 14:59:36 +02:00
Philip Rebohle
de4c88d5aa
[d3d11] Skip CopyResource when src and dst resource are the same
2018-09-28 19:41:27 +02:00
Philip Rebohle
c9d61e16d9
[d3d11] Skip ResolveSubresource when dst and src resource are the same
...
Fixes black screen issue in Mortal Kombat X (#670 ).
2018-09-28 19:41:16 +02:00
Philip Rebohle
161fb6215a
[d3d11] Optimize UAV binding
...
- UpdateBuffer is faster than ClearBuffer for small updates.
- We shouldn't dispatch *two* CS commands for each UAV, one is enough.
2018-09-27 16:50:34 +02:00
Philip Rebohle
c5f7f9f3b0
[d3d11] Enable usage flags for meta copy formats
...
This is required in order to make meta copies work between images
that do not have the necessary D3D11 bind flags set, and it may
speed things up because it allows rendering to the destination
image directly rather than requiring a temporary image.
2018-09-27 11:44:09 +02:00
Philip Rebohle
305c361c00
[d3d11] Fix incomplete usage mask for buffer UAVs
2018-09-25 10:14:42 +02:00
Philip Rebohle
689602497f
[d3d11] Use state cache
2018-09-23 14:41:49 +02:00
Philip Rebohle
03a760bec6
[meta] Remove redundant linker entries for the utils library
...
Fixes #651 .
2018-09-19 21:00:44 +02:00
Philip Rebohle
35238ec4d1
[d3d11] Make D3D11 context methods more robust to null pointers
...
Assetto Corsa tries to do some questionable things when reflections
are disabled in the game options. Refs #648 .
2018-09-19 12:33:30 +02:00
Philip Rebohle
c1190e81b2
[d3d11] Handle pResource == nullptr case during view creation
2018-09-19 11:55:11 +02:00
Philip Rebohle
837a3f5787
[d3d11] Don't allow creation of 0x0-sized textures
2018-09-18 21:33:27 +02:00
Philip Rebohle
bf5476900a
[d3d11] Expose Feature Level 11_1
...
- We don't actually support the ExtendedResourceSharing feature, but
since we currently don't support resource sharing at all, this makes
no difference in practice
- Likewise, MultisampleRTVWithForcedSampleCountOne is not really
supported, as the Vulkan backend will still use the sample count
of the color attachments, but should have no effect in practice.
- This does not change the fact that Predication and Stream Output
are still missing.
2018-09-18 16:27:40 +02:00
Philip Rebohle
d9009efd22
[d3d11] Implement and advertize support for CopyWithOverlap feature
2018-09-18 16:22:47 +02:00
Philip Rebohle
3f47fdab4d
[d3d11] Advertize support for the ForcedSampleCount rasterizer state
2018-09-18 13:23:28 +02:00
Philip Rebohle
482930f04a
[dxvk] Implement backend support for D3D11 forced sample count
...
We don't support rasterization with a sample count different from
the framebuffer sample count, but if there are no attachments, any
sample count is allowed.
2018-09-18 13:22:28 +02:00
Philip Rebohle
4469ef1ec1
[d3d11] Replace shader debug name with shader key
2018-09-18 10:35:27 +02:00
Philip Rebohle
a078bb947e
[d3d11] Replace D3D11ShaderKey with DxvkShaderKey
2018-09-18 10:35:08 +02:00
Philip Rebohle
6c889c0005
Revert "[d3d11] Avoid unnecessary buffer slice copy when mapping buffer"
...
This reverts commit 72106a02cb
.
Breaks things for some reason. Doesn't have much of an impact anyway.
2018-09-17 23:08:00 +02:00
Philip Rebohle
72106a02cb
[d3d11] Avoid unnecessary buffer slice copy when mapping buffer
2018-09-17 22:04:31 +02:00
Philip Rebohle
19408f0ebe
[d3d11] Fix reported RowPitch/DepthPitch for mapped buffers
...
Some games rely on this being the exact buffer size.
2018-09-17 07:45:05 +02:00
Philip Rebohle
f9add97a07
[d3d11] Fix Begin/End for all queries other than Event and Timestamp
2018-09-11 13:00:52 +02:00
Philip Rebohle
ea9e812798
[dxvk] Introduce new 'Created' state for queries
...
New initial state for queries. D3D11 returns an error when trying to
retrieve data from a query in this state, rather than S_FALSE or S_OK.
2018-09-10 23:07:51 +02:00
Philip Rebohle
d7441f274b
[dxvk] Enable device features for VK_EXT_vertex_attribute_divisor
2018-09-10 22:10:16 +02:00
Philip Rebohle
012a5c2f74
[d3d11] Add option to enforce anisotropic filtering
...
When setting d3d11.samplerAnisotropy to a non-negative value,
AF will be either disabled (0) or enabled with the given
anisotropy (>0) for all samplers.
2018-09-10 15:42:55 +02:00
Philip Rebohle
f8dc5612f7
[d3d11] Added option to limit tessellation factors
...
d3d11.maxTessFactor accepts values ranging from 8 to 64, and limits
the maximum tessellation factor accordingly.
2018-09-09 23:14:00 +02:00
Philip Rebohle
57e5b05f32
[d3d11] Fix layer count for 3D RTVs with non-zero base mip level
...
We have to take the mip level into account as well, or otherwise
we may create a view with more layers than the selected mip level has.
2018-09-04 07:39:46 +02:00
Philip Rebohle
09948a3495
[d3d11] Synchronize CS thread after flush when waiting for resource
...
In some rare cases, the flush operation itself may add new references
which we need to see while spinning on the resource's usage counter.
2018-09-01 21:25:39 +02:00
Philip Rebohle
ffc2130ee6
[d3d11] Pass format swizzle to render target views
...
Fixes missing caterpillars in World of Tanks (#410 ).
2018-09-01 18:15:31 +02:00
Philip Rebohle
66d1bed083
[d3d11] Remove old UAV counter buffer implementation
2018-08-30 15:32:46 +02:00
Philip Rebohle
5c45a50daf
[d3d11] Use D3D11CounterBuffer for UAV counters
2018-08-30 15:24:47 +02:00
Philip Rebohle
9992ba1a79
[d3d11] Add more general counter buffer allocator
...
We're going to need it for more than just UAV counters soon.
2018-08-30 15:24:38 +02:00
Philip Rebohle
f1b075c0f3
[dxvk] Add CS chunk pool
...
Reduces the number of dynamic memory allocations for CS chunks by
recycling them once they are no longer needed. Also fixes a potential
issue with chunks that are dispatched multiple times.
2018-08-27 16:07:38 +02:00
Philip Rebohle
f75e3ad13f
[d3d11] Fix silly GenerateMips bug
2018-08-16 00:57:16 +02:00
Philip Rebohle
c3c7a4172d
[d3d11] Fix interface query for ID3D11Predicate
2018-08-16 00:13:40 +02:00
Mikhail Paulyshka
2a96d717d3
[d3d11] fixed compilation with MinGW-headers 6.0.0 or greater
2018-08-15 22:02:39 +02:00
Philip Rebohle
e271bc490e
[d3d11] Enable ExtendedDoublesShaderInstructions
2018-08-15 20:12:41 +02:00
Philip Rebohle
0b1b898be4
[d3d11] Implement ID3D11DeviceContext1::ClearView
...
Required for Feature Level 11_1.
2018-08-15 19:03:26 +02:00
Philip Rebohle
beedd39f7d
[dxvk] Accept VkClearValue in DxvkContext::clearImageView
2018-08-15 19:03:26 +02:00
Philip Rebohle
da21a6db7f
[d3d11] Silence warning about GenerateMips being called on buffers
2018-08-15 19:03:26 +02:00
Philip Rebohle
e671692886
[d3d10] Implement D3D10Shader
2018-08-13 17:22:42 +02:00
Philip Rebohle
2af07c5faf
[d3d10] Implement D3D10Query
2018-08-13 17:22:42 +02:00
Philip Rebohle
ae12fbd23c
[d3d10] Implement D3D10CreateDepthStencilView
2018-08-13 17:22:42 +02:00
Philip Rebohle
ea46a0340e
[d3d10] Implement D3D10RenderTargetView
2018-08-13 17:22:42 +02:00
Philip Rebohle
0052ff236b
[d3d10] Implement D3D10ShaderResourceView
2018-08-13 17:22:42 +02:00
Philip Rebohle
ddb2a7bd59
[d3d10] Implement D3D10RasterizerState
2018-08-13 17:22:42 +02:00
Philip Rebohle
68bfacfcaa
[d3d10] Implement D3D10DepthStencilState
2018-08-13 17:22:41 +02:00
Philip Rebohle
f2381ac4eb
[d3d10] Implement D3D10BlendState
2018-08-13 17:22:41 +02:00
Philip Rebohle
ace06ce697
[d3d10] Implement D3D10InputLayout
2018-08-13 17:22:41 +02:00
Philip Rebohle
759ff737a4
[d3d10] Implement D3D10SamplerState
2018-08-13 17:22:41 +02:00
Philip Rebohle
553c90307a
[d3d10] Implement D3D10Buffer
2018-08-13 17:22:41 +02:00
Philip Rebohle
b97f9a702a
[d3d10] Implement D3D10 texture interfaces
2018-08-13 17:22:36 +02:00
Philip Rebohle
1e857f6342
[d3d10] Add D3D10Device stub
2018-08-13 17:22:03 +02:00
Philip Rebohle
8c1063b512
[d3d10] Add build files and implement D3D10CreateDevice functions
2018-08-13 17:22:00 +02:00
Philip Rebohle
7a28f01eca
[d3d11] Enable drawIndirectFirstInstance for FL11_0 and higher
2018-08-10 04:34:54 +02:00
Philip Rebohle
82c891b1fb
[d3d11] Fix structured buffer view validation
2018-08-10 02:39:35 +02:00
Philip Rebohle
40050e4e3f
[d3d11] Report bind flags instead of usage when view creation fails
2018-08-10 02:39:14 +02:00
Philip Rebohle
cc5219f8c0
[d3d11] Add meaningful error messages when view creation fails
2018-08-10 02:15:51 +02:00
Philip Rebohle
5276a90195
[d3d11] Add format and resource type to D3D11_COMMON_RESOURCE_DESC
2018-08-10 02:15:30 +02:00
Philip Rebohle
f9e096e954
[d3d11] Validate buffer view format compatibility
...
Prevents the app from creating illegal buffer views.
2018-08-09 23:37:41 +02:00
Philip Rebohle
9373bab3e3
[d3d11] Validate image view format compatibility correctly
...
Prevents the application from creating illegal image views.
2018-08-09 23:34:03 +02:00
Philip Rebohle
7e0a2a9165
[d3d11] Added GetBufferFormatFeatures and GetImageFormatFeatures helpers
2018-08-09 23:33:36 +02:00
Philip Rebohle
f586970c59
[d3d11] Validate buffer view bind flags
2018-08-09 22:04:03 +02:00
Philip Rebohle
b06eb4fe2a
[d3d11] Validate image view bind flags
...
Since the bind flags of the texture may not always match the
image usage flags of the underlying Vulkan image, we should
use the latter to check whether a view can be created.
2018-08-09 21:58:58 +02:00
Philip Rebohle
cdc85a1238
[d3d11] Add GetImageUsageFlags and GetBufferUsageFlags helpers
2018-08-09 21:49:31 +02:00
Philip Rebohle
1a4b17d607
[d3d11] Use user config to determine the maximum feature level
2018-08-09 21:08:03 +02:00
Philip Rebohle
73c91138db
[d3d11] Allow creation of SRGB textures with D3D11_BIND_UNORDERED_ACCESS
...
Should fix a crash in Call of Duty: Advanced Warfare.
2018-08-09 17:13:35 +02:00
Philip Rebohle
dc31be7118
[d3d11] Use global user config for D3D11 options
2018-08-07 14:59:09 +02:00
Philip Rebohle
3359b89166
[d3d11] Do not hold strong references to the ID3D11Resource in views
...
Emulates Windows behaviour more closely. Fixes refcount-related
error messages in Unreal Engine 4 (see #302 ), as well as a crash
in Yakuza 0 (see #533 ).
2018-08-05 21:31:13 +02:00
Philip Rebohle
ffc87faed0
[d3d11] Add private ref count helpers for ID3D11Resource
2018-08-05 21:31:13 +02:00
Philip Rebohle
c223e35608
[d3d11] Do not keep a strong reference to the swap chain back buffer
...
Fixes crash in Yakuza 0 with fullscreen mode enabled. SEGA, please,
stop being lazy and learn to use reference counting correctly.
2018-08-05 21:31:13 +02:00
Philip Rebohle
871c96b130
[d3d11] Refactor Unordered Access View Creation
...
Part 4 / 4 of the refactor.
2018-08-05 19:28:39 +02:00
Philip Rebohle
55203eb458
[d3d11] Refactor Shader Resource View Creation
...
Part 3 / 4 of the refactor.
2018-08-05 19:20:12 +02:00
Philip Rebohle
1038bf2ef5
[d3d11] Refactor Render Target View Creation
...
Part 2 / 4 of the refactor.
2018-08-05 19:07:53 +02:00
Philip Rebohle
0598982f35
[d3d11] Refactor Depth-Stencil View Creation
...
Part 1 of 4 of a much needed refactor. Instead of translating
the structures in the D3D11Device class, we'll move the code
to the respective view classes in order to clean up.
2018-08-05 19:02:45 +02:00
Philip Rebohle
16315a39a0
[d3d11] Use new resource helper functions during view creation
...
This simplifies things when both buffers and textures are allowed.
2018-08-05 18:56:42 +02:00
Philip Rebohle
b87f3f5155
[d3d11] Add common resource helper functions
2018-08-05 18:45:24 +02:00
Philip Rebohle
66e178756e
[d3d11] Introduce GetCommonBuffer helper
...
Also update GetCommonTexture documentation.
2018-08-05 18:29:29 +02:00
Philip Rebohle
ace8e42213
[d3d11] Move BufferInfo struct into D3D11Buffer
2018-08-05 18:24:01 +02:00
Philip Rebohle
fe66e668e5
[dxvk] Implement native discardBuffer function in the backend
...
This may be more efficient because it avoids renaming the buffer
in case it can be used without inserting additional barriers.
2018-08-03 11:28:00 +02:00
Philip Rebohle
fb88070888
[d3d11] Implement copy flags for CopySubresourceRegion1 / UpdateSubresource1
2018-08-03 11:22:26 +02:00
Philip Rebohle
3fee20dfec
[d3d11] Implement DiscardResource for buffers
...
We don't suppor this for images, and we don't support DiscardView yet.
Buffers can be invalidated, which may in some cases be beneficial in
order to avoid synchronization on the GPU.
2018-08-03 11:10:40 +02:00
Philip Rebohle
8044ce6c7e
[d3d11] Refactor UAV counter buffer allocator
...
- Fixes violation of the minStorageBufferOffsetAlignment limit
- Allows allocation of multiple counter buffers if necessary
2018-08-03 10:17:02 +02:00
Philip Rebohle
212bd56b93
[d3d11] Fix border color mapping for opaque white
2018-08-02 17:04:09 +02:00
Philip Rebohle
0ba00b3f59
[dxvk] Add extended device feature structure
...
This allows the client API to query and enable extended
features in the future, should it become necessary, much
like the extende feature queries.
2018-07-31 16:58:25 +02:00
Philip Rebohle
bf06654a83
[d3d11] Remove DXVK_SHADER_READ_PATH
...
Broken, and won't work with ICB UBOs.
2018-07-30 20:29:05 +02:00
Philip Rebohle
bf912d0a5f
[d3d11] Create shader constant buffer if necessary
2018-07-30 20:29:05 +02:00
Philip Rebohle
c31e646921
[dxvk] Introduce concept of shader constants
...
Large constant arrays should be moved to a uniform buffer instead
of being baked directly into the shader code.
2018-07-30 20:29:05 +02:00
Philip Rebohle
af5de8a8ef
[d3d11] Fix compiler warning
2018-07-30 20:27:18 +02:00
Philip Rebohle
7f0f7ac048
[d3d11] Refactor shader binding
...
This way we can get rid of an unnecessary template and make future
extensions possible.
2018-07-30 19:37:19 +02:00
Philip Rebohle
adadf362a3
[d3d11] Optimize WaitForResource behaviour when resource is already idle
...
We don't have to flush everything in this case, just flushing the current
CS chunk is enough to determine if the resource is in use by the GPU.
2018-07-23 16:08:01 +02:00
Philip Rebohle
662b6429a8
[d3d11] Refactor resource initialization
...
In addition to moving the code to a separate class, this also
improves flushing behaviour by limiting the amount of memory
being initialized rather than the number of commands executed.
2018-07-23 15:21:17 +02:00
Mikhail Paulyshka
f38ee85a39
[build] Fix compilation on MSVC ( #505 )
...
* [build] do not use shared_library/objects property with MSVC
* [util] use ./com/com_include.h instead of windef.h
It is required for Windows 10 SDK.
* [util] store thread procedure lambda in std::function
* [dxgi] fix annoying MSVC warning
warning C4099: 'IDXGIVkInteropDevice': type name first seen using 'class' now seen using 'struct'
2018-07-21 12:43:33 +02:00
Philip Rebohle
5fe4c4f610
[dxvk] Use VkImageViewUsageCreateInfoKHR when creating image views
...
Must be used when view formats are used that do not support all
usage bits of the underlying image. Refs #504 .
2018-07-21 10:58:06 +02:00
Jacek Caban
88cda20746
[d3d11] Import dxgi by -l instead of directly specifying library name.
2018-07-19 08:55:34 +02:00
Jacek Caban
c934d85b85
[d3d11] Move D3D11ImmediateContext constexpr values to .cpp file
...
In my winelib builds, I get unresolved dxvk::D3D11ImmediateContext::MinFlushIntervalUs symbol. I'm not sure why it doesn't inline this constexpr, but it doesn't seem useful to expose that in header anyway.
2018-07-19 08:55:34 +02:00
Jacek Caban
6d16bb4c87
Don't use std::thread.
...
Wine needs to setup each thread that has an access to Windows APIs. It means that in winelib builds, we can't let standard C++ library create threads and need to use Wine for that instead. I wrote a thin wrapper around Windows thread functions so that the rest of code just has to use new dxvk::thread class instead of std::thread.
2018-07-19 08:55:34 +02:00
Jacek Caban
06511aa72c
[build] Use .spec files instead of .def files in winelib build
2018-07-19 08:55:34 +02:00
Jacek Caban
635a43fefe
[build] Explicitly specify .dll and .exe extensions in winelib build
...
meson can't handle that itself.
2018-07-19 08:55:34 +02:00
Philip Rebohle
2100d7aa3a
[d3d11] Fake SO support for F1 2015, Mafia 3
2018-07-12 00:32:36 +02:00
Philip Rebohle
87b5161b2a
[d3d11] Reset implicit flush timer only when actually flushing
...
In some situations, calling Flush without any commands that
could be flushed would unnecessarily prevent the implicit
flush heuristic from kicking in properly.
2018-07-09 20:31:54 +02:00
Philip Rebohle
c8c6f24b63
[d3d11] Fix log spam when an application uses DiscardView
...
We don't support this method, but we should only issue the warning
once to prevent poor performance.
2018-07-08 15:53:30 +02:00
Philip Rebohle
974db9712b
[dxvk] Remove clear rect parameter from clearRenderTarget
...
With deferred clears and render target-based clears, this was
not properly supported anyway.
2018-07-06 15:01:37 +02:00