1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00
Commit Graph

6271 Commits

Author SHA1 Message Date
Philip Rebohle
1b9c59c964 [dxvk] Refactor events to be properly ref-counted
Mostly serves as a proof-of-concept for the pending query rework,
but also cleans up some silly code.
2024-10-13 12:08:35 +02:00
Philip Rebohle
d00669cb52 [dxvk] Rename DxvkGpu{Event,Query} to Dxvk{Event,Query}
The old name only ever existed because DXVK had two separate implementations
of these prior to version 1.1. Let's name them back so that more sensible
names are available for internal use.
2024-10-13 12:08:35 +02:00
Robin Kertels
5890eae32f [d3d9] Don't clear mipGenBit if texture is bound as attachment 2024-10-13 12:07:30 +02:00
Robin Kertels
5ff365b9f1 [d3d9] Remove initializer context 2024-10-12 10:09:17 +02:00
WinterSnowfall
48c57c11e9 [d3d9] Make proper use of X/YHotSpot for software cursors 2024-10-11 12:40:37 +02:00
WinterSnowfall
44b682051b [d3d8] Stub DebugSetMute to fix C&C:Generals performance 2024-10-10 13:06:54 +02:00
WinterSnowfall
c8759418af [d3d9] Fix device reset handling when no cursor is set 2024-10-10 09:31:13 +02:00
Robin Kertels
d39d879838 [d3d9] Add a bunch of missing likely/unlikely to PrepareDraw
PrepareDraw is pretty much the hottest part of the d3d9
frontend, so we take every tiny bit we get.
2024-10-09 21:28:59 +00:00
Robin Kertels
395ac38890 [d3d9] Fix fixed function texture mask
Fixed function supports 8 textures so we need 8 ones.
2024-10-09 21:28:59 +00:00
WinterSnowfall
a1a3800b3f [d3d9] Fix software cursor reset and transitions 2024-10-08 20:20:31 +02:00
Philip Rebohle
a30fdc466b [d3d11] Remove initializer context
This moves all initialization commands to the CS thread and the regular
context in such a way that resource initialization is processed before
any context commands can use the resource.
2024-10-08 17:46:18 +02:00
Philip Rebohle
ac1dfbacb6 [dxvk] Move image initialization to init command buffer 2024-10-08 17:46:18 +02:00
Philip Rebohle
0f6f543583 [dxvk] Silence validation error about invalid shaders
Known validation bug that is already fixed upstream, but this makes
validation layers unusable due to how spammy that is.
2024-10-08 17:46:18 +02:00
Philip Rebohle
df60a061a4 [d3d11] Throttle resource uploads via UpdateSubresource
Otherwise, some games (e.g. Frostpunk, New World) end up allocating over
a gigabyte of staging memory.
2024-10-08 17:46:18 +02:00
Philip Rebohle
ec18dd7846 [d3d11] Throttle resource uploads through staging buffer 2024-10-08 17:46:18 +02:00
Philip Rebohle
d330718353 [dxvk] Implement staging buffer statistics 2024-10-08 17:46:18 +02:00
Philip Rebohle
e137f049ee [dxvk] Make buffer<->image copy format checks more robust
There are situations where the source format may not match
the image format but the copy is valid nonetheless.
2024-10-08 17:46:18 +02:00
Philip Rebohle
e6f90b8003 [dxvk] Remove legacy depth/stencil repacking code 2024-10-08 17:46:18 +02:00
Philip Rebohle
ad1f70beea [dxvk] Support format conversion in copyImageToBuffer 2024-10-08 17:46:18 +02:00
Philip Rebohle
f67c8dd1da [dxvk] Support format conversion in copyBufferToImage 2024-10-08 17:46:18 +02:00
Philip Rebohle
501b0991da [dxvk] Remove per-context staging buffer
No longer used.
2024-10-08 17:46:18 +02:00
Philip Rebohle
725a04b954 [dxvk,d3d11] Refactor uploadImage to consume a staging buffer
And also handle format differences.
2024-10-08 17:46:18 +02:00
Philip Rebohle
34e0f6952b [dxvk] Always enable depth-stencil usage for depth-stencil formats 2024-10-08 17:46:18 +02:00
Philip Rebohle
2fac69b7f9 [dxvk] Add pipelines for buffer-to-image and image-to-buffer copies 2024-10-08 17:46:18 +02:00
Philip Rebohle
15d5b69d2c [dxvk] Add new format conversion shaders
Intended to replace the old pack/unpack shaders.
2024-10-08 17:46:18 +02:00
Philip Rebohle
3c50ac1f12 [dxvk] Rename DxvkCopyBufferImage* stuff
Slightly misleadning name when we're going to introduce copies
between buffers and images.
2024-10-08 17:46:18 +02:00
Philip Rebohle
c92ee8ee07 [dxvk,d3d11] Refactor uploadBuffer to consume a staging buffer 2024-10-08 17:46:18 +02:00
Philip Rebohle
c27cae2f10 [d3d11] Improve per-context staging buffer handling
In D3D11, the staging buffer is only used for UpdateSubresource, which
isn't always used much. Reducing the size and freeing the buffer after
every submission avoids situations where system memory chunks are kept
alive by a single unused 4MB allocation.
2024-10-08 17:46:18 +02:00
Philip Rebohle
c614e537a9 [dxvk] Remove alignment parameter from staging buffers
Just align all suballocations to 256 bytes as usual.
2024-10-08 17:46:18 +02:00
WinterSnowfall
7eec8fb8dc [d3d8] Various logging format adjustments 2024-10-08 00:25:55 +02:00
WinterSnowfall
559398f6a4 [d3d9] Check block alignment on texture creation with DXT formats 2024-10-08 00:25:55 +02:00
WinterSnowfall
1689cacc47 [d3d8] Stub ValidatePixelShader and ValidateVertexShader 2024-10-08 00:25:55 +02:00
WinterSnowfall
66bd9ec4dd [d3d8] Always forward SetRenderTarget calls to D3D9 2024-10-08 00:25:55 +02:00
WinterSnowfall
8c54969552 [d3d8] Skip stride updates for null buffers in SetStreamSource 2024-10-08 00:25:55 +02:00
WinterSnowfall
088cf45439 [d3d9] Validate 0 valued back buffer dimensions for fullscreen mode 2024-10-08 00:25:55 +02:00
WinterSnowfall
6e0c048b88 [d3d9] Return D3DERR_DEVICELOST on reset failure due to losable resources 2024-10-08 00:25:55 +02:00
WinterSnowfall
912a530d1c [d3d9] Enforce various CheckDeviceMultiSampleType validations 2024-10-08 00:25:55 +02:00
WinterSnowfall
eae12e6f23 [d3d8] Cache all back buffers for additional swapchains 2024-10-08 00:25:55 +02:00
WinterSnowfall
bc78fc6ed0 [d3d8] Validate D3D8 present params before conversion 2024-10-08 00:25:55 +02:00
WinterSnowfall
4a8ba388ff [d3d8] Validate CheckDeviceType windowed calls similarly to fullscreen 2024-10-08 00:25:55 +02:00
WinterSnowfall
653559979c [d3d8] Fix LookupSubresource texture type typo 2024-10-08 00:25:55 +02:00
Philip Rebohle
7935f3934f [dxvk] Sanitize sampler LOD range
Silences a validation error in Dishonored 2. At least on AMD,
MinLOD takes precedence over MaxLOD, so let's do the same.
2024-10-07 19:34:02 +02:00
Philip Rebohle
571a2d5811 [dxvk] Tweak staging memory allocation behaviour 2024-10-07 13:32:46 +02:00
Philip Rebohle
813524c146 [d3d11] Remove texel buffer path for ClearUAV
Instead, recreate the image with the given view format as
necessary. Most of the time we will not actually need this.
2024-10-06 08:47:42 +02:00
Philip Rebohle
851f02fa58 [dxvk] Actually apply new create flags when relocating image
Fixes a derp that leads to validation errors when adding view formats.
2024-10-06 08:47:42 +02:00
WinterSnowfall
36907ec01c [d3d8] Adjust shader handles to skip 0x0001 2024-10-05 20:03:05 +02:00
WinterSnowfall
980a8d185c [d3d9] Use D24X8 for D3DFMT_UNKNOWN depth stencils 2024-10-05 20:03:05 +02:00
WinterSnowfall
4f90ad46b9 [d3d8] Validate D3D9 auto depth stencil query 2024-10-05 20:03:05 +02:00
WinterSnowfall
1675aea857 [d3d8] CopyRects validation tweaks 2024-10-05 20:03:05 +02:00
WinterSnowfall
b13b875ca6 [d3d8] Rework D3D8 device GetInfo implementation 2024-10-05 20:03:05 +02:00