Philip Rebohle
138dde6c3d
[dxvk] Prefer VRAM allocation over dedicated sysmem allocation
...
May in some cases improve performance when under memory pressure:
If a dedicated allocation is preferred, but the alloaction fails,
try to allocate memory from an already allocated chunk instead
of falling back to system memory right away.
2019-06-20 10:34:54 +02:00
Joshua Ashton
a4a4f5a822
[util] Correct return value of SetThreadDescription
2019-06-19 19:43:36 +02:00
Philip Rebohle
0a35ae6fca
[dxvk] Log memory utilization per heap on memory allocation failures
2019-06-19 14:47:09 +02:00
Philip Rebohle
684355dfca
[d3d11] Fix GetData parameter validation
...
We're supposed to return an error if a null pointer is
passed along with a non-zero DataSize. Fixes more wine
test failures.
2019-06-16 19:24:44 +02:00
Philip Rebohle
43389d8ef4
[d3d11] Implement timestamp disjoint queries
2019-06-16 17:14:39 +02:00
Philip Rebohle
1c718402f8
[d3d11] Use an array for query and event objects
...
We're going to need multiple queries to implement certain query types.
2019-06-16 17:14:24 +02:00
Philip Rebohle
fd1b5c8eb9
[dxvk] Add method to permanently change image layout
2019-06-15 16:45:59 +02:00
Philip Rebohle
dc3e5e5949
[meta] Release 1.2.2
2019-06-15 12:58:31 +02:00
Philip Rebohle
58dcf77c08
[dxbc] Disable atomic counter optimization on old RADV versions
...
Breaks TressFX in Tomb Raider 2013 for some reason, whereas this works
fine on 19.1 with both LLVM 8.0 and 9.0-git.
2019-06-15 12:58:31 +02:00
Philip Rebohle
a715937db1
[dxvk] Always pass through fully enabled color write masks
...
May improve performance when rendering to RGB-only or Alpha-only
images, which seems to be especially common in D3D9.
2019-06-14 14:27:21 +02:00
Philip Rebohle
c8a429b9e1
[d3d11] Fix CheckMultisampleQualityLevels return code
...
We're supposed to return E_FAIL for unsupported sample counts,
and not zero-initialize the returned quality level count if the
format is invalid. Fixes wine test failures.
2019-06-14 13:37:01 +02:00
Philip Rebohle
5a66da8ef8
[dxvk] Fix various issues in GetFormatSupportFlags
...
- Support DXGI_FORMAT_UNKNOWN for buffer resources
- Report D3D11_FORMAT_SUPPORT_CPU_LOCKABLE for all supported formats
- Report support for linear-only image formats properly
- Return E_FAIL in case the format is not supported
Fixes a crash in Planet Coaster (#1091 ).
2019-06-13 16:32:41 +02:00
Joshua Ashton
9d2f31d231
[vulkan] Add operator overloads for VkOffset3D/2D
2019-06-13 04:45:16 +02:00
Philip Rebohle
1bc0b51262
[d3d11] Implement IDXGISurface2 for ID3D11Texture1D
2019-06-13 04:37:35 +02:00
Philip Rebohle
586d0de7bb
[d3d11] Fix default blend factor
2019-06-13 04:15:23 +02:00
Philip Rebohle
089d47e02e
[d3d11] Fix WSize computation for UAV creation
2019-06-13 04:01:15 +02:00
Philip Rebohle
f02a5a7453
[d3d11] Don't create SRVs and UAVs with a size of 0
...
This is illegal and triggers invalid Vulkan usage.
2019-06-13 03:47:10 +02:00
Philip Rebohle
4ffddd1e40
[d3d11] Skip GenerateMips if mip gen flag is not set on resource
2019-06-13 03:31:31 +02:00
Philip Rebohle
ce03384ba9
[d3d11] Validate bind flags for D3D11_RESOURCE_MISC_GENERATE_MIPS
2019-06-13 03:31:31 +02:00
Philip Rebohle
63d8d9c3db
[d3d11] Validate buffer descriptions
2019-06-13 03:31:26 +02:00
Philip Rebohle
6a76577f15
[d3d11] Fix behaviour with a viewport count of zero
2019-06-13 02:22:07 +02:00
Philip Rebohle
5ff9c33855
[d3d11] Fix incorrect behaviour when a scissor rect is not specified
2019-06-13 02:16:12 +02:00
Philip Rebohle
78071c750d
[d3d11] Fix crash when setting too many viewports
2019-06-13 01:54:55 +02:00
Philip Rebohle
3b1e03f988
[util] Report correct GPU vendor to Far Cry 3, 4 and Blood Dragon
...
Now that fast clear behaviour has been fixed in RADV, reporting an
Nvidia GPU breaks rendering again since the game expects the clear
behaviour to match that of the Windows D3D11 drivers exactly. To
recap, clear(0.5) on an R8_UNORM render target results in 127 on
Nvidia GPUs and 128 on AMD GPUs.
2019-06-12 12:32:30 +02:00
Philip Rebohle
d5ba36443e
[dxbc] Fix useRawSsbo option
...
Add some break to fix some breakage.
2019-06-11 20:23:47 +02:00
Philip Rebohle
d755b18ccb
[dxbc] Repurpose useRawSsbo option
...
Basically, abuse the minSsboAlignment property to convince the
compiler to always/never emit raw SSBOs for raw and structured
buffers, and use the actual device limit by default.
2019-06-11 20:20:40 +02:00
Philip Rebohle
0f7c23c022
[dxbc] Always use raw storage buffers if alignment requirements are met
2019-06-11 20:20:40 +02:00
Philip Rebohle
163e6aaa50
[dxbc] Store alignment for raw and structured buffers
2019-06-11 20:20:40 +02:00
Philip Rebohle
acab2bd8ce
[d3d11] Fix crash in GetMaximumFrameLatency with a nullptr argument
2019-06-11 16:36:43 +02:00
Philip Rebohle
96b9058fbf
[util] Fix COM private data bug when passing NULL interface
...
Fixes test failure in wine's DXGI tests.
2019-06-11 16:08:28 +02:00
Philip Rebohle
6d999fad89
[dxgi] Fix some issues introduced with FilterModesByDesc cleanup
2019-06-11 15:45:32 +02:00
Andrew Eikum
cd6e3ffe75
[dxgi] Return non-exact matches from FindClosestMatchingMode1
2019-06-11 02:29:25 +02:00
Philip Rebohle
3dbccb1b61
[dxvk] Revert buffer re-binding optimization
...
While this optimization can significantly reduce CPU overhead, this
breaks World of Warcraft for some reason. Fixes #1086 .
2019-06-06 17:22:17 +02:00
Philip Rebohle
3de87b41a0
[dxvk] Add likely/unlikely around critical CS chunk append code
2019-06-05 22:57:51 +02:00
Philip Rebohle
461a2bec36
[dxvk] Only update buffer object in buffer slices if necessary
...
Saves CPU cycles when rebinding the same vertex, index and
constant buffers with different offsets.
2019-06-05 20:32:12 +02:00
Philip Rebohle
7e66dc61b9
[d3d11] Avoid buffer ref count changes when only changing offsets
...
Saves a few CPU cycles in the somewhat common situation where the
currently bound vertex, index or constant buffer is re-bound with
a different offset.
2019-06-04 17:53:54 +02:00
Philip Rebohle
f501ebce97
[dxvk] Avoid redundant descriptor set updates when binding buffers
...
Reduces unnecessary overhead when binding a different range of the
same buffer, e.g. through D3D11 VSSetConstantBuffers1.
2019-06-03 20:17:15 +02:00
Philip Rebohle
e4e82007b1
[d3d11] Fix inconsistencies in Map/Unmap on immediate/deferred contexts
...
Should save a few CPU cycles, and also fixes incorrect behaviour when an
application passes null pointers to Map on a deferred context.
2019-06-03 15:31:13 +02:00
Philip Rebohle
58d838b915
[d3d11] Avoid emitting redundant vertex and index buffer updates
2019-06-03 00:18:54 +02:00
Philip Rebohle
19adccea8f
[util] Add unlikely() around COM ref counting code
...
Improves code generation for the common case.
2019-06-02 23:34:53 +02:00
Philip Rebohle
818704d413
[d3d11] Add some likely/unlikely around CS flushes
2019-06-02 20:29:22 +02:00
Philip Rebohle
6cbd611190
[d3d11] Don't clear DSV aspects that are marked as read-only
...
Saint's Row 4 appears to be doing this. Ref #24 .
2019-06-02 16:34:50 +02:00
Philip Rebohle
c59a8e6e48
[d3d11] Initialize depth images to zero rather than one
...
Matches Windows behaviour.
2019-06-02 16:33:54 +02:00
Philip Rebohle
40d4922682
[d3d11] Fix initial swap chain image count
...
Reported-by: Joshua Ashton <joshua@froggi.es>
2019-06-02 15:00:15 +02:00
Philip Rebohle
42c9fad017
[dxvk] Fix binding indices for vertex attribute divisor
...
Also, only emit a divisor description if the divisor isn't 1.
2019-06-02 10:59:34 +02:00
Philip Rebohle
7d91ff06a3
[util] Fix return value of AddRef
...
We're supposed to return the new ref count, not the old one.
2019-06-01 22:12:32 +02:00
Philip Rebohle
1e0fe36cae
[d3d11] Respect COPY_FLAG_NO_OVERWRITE when updating constant buffers
...
Heavy Rain uses this to update constan buffers on deferred contexts.
2019-05-25 14:42:32 +02:00
Philip Rebohle
754cf6da30
[d3d11] Validate subresource index in MapImage
...
Fixes crashes when passing an invalid subresource index.
2019-05-20 19:27:27 +02:00
Philip Rebohle
3168626f4b
[d3d11] Support mapping multiple image subresources at the same time
...
Fixes #1066 .
2019-05-20 19:27:11 +02:00
Philip Rebohle
a82dbf6200
[dxvk] Add new helper function to compute mip level extent
...
We're going to need this outside the DxvkImage class as well.
2019-05-20 14:27:00 +02:00