Joshua Ashton
b1edf227f8
[d3d9] Enable depth bounds feature, if supported
...
Only expose it in format checks if the adapter supports the feature also
2020-01-28 01:51:04 +00:00
Joshua Ashton
720cdf383e
[d3d9] Use spec constants for bool constants
2020-01-27 14:21:21 +01:00
Joshua Ashton
a43223256e
[d3d9] Fix GetTextureStageState using unmapped types
...
Closes #1378
2020-01-27 01:07:11 +00:00
Joshua Ashton
9b486515fa
[d3d9] Allow StretchRect BC -> BC format without stretch
2020-01-25 00:31:45 +00:00
Philip Rebohle
5d2215e898
[d3d9] Don't try to blit to compressed images
...
Fixes Vulkan validation errors and potential driver crashes in
Dragon Age Origins.
2020-01-24 22:59:26 +00:00
Joshua Ashton
13792df4c5
[d3d9] Don't mark D3DUSAGE_AUTOGENMIPMAP as renderable
...
We can't access those mips via locking in D3D9 so it's a-okay! :)
2020-01-24 15:54:15 +00:00
Joshua Ashton
f804c6364d
[d3d9] Implement d3d9.allowDoNotWait
2020-01-24 15:54:15 +00:00
Joshua Ashton
764cb5634f
[d3d9] Unmark resources as dirty if they get discarded
2020-01-24 15:54:15 +00:00
Joshua Ashton
6fa28bf937
[d3d9] Don't block on GetRenderTargetData
...
Fixes perf in #1363
2020-01-24 15:54:15 +00:00
Philip Rebohle
38a0d2c552
[d3d9] Don't check for sRGB formats when retrieving back buffer view
...
Turns out this is always false anyway.
2020-01-24 01:47:52 +01:00
Philip Rebohle
582b06a706
[d3d9] Rotate swap chain back buffers
...
Restores functionality removed in 81c3daa3d0
.
2020-01-24 00:27:09 +00:00
Philip Rebohle
6a6af16195
[d3d9] Retrieve back buffer view from the D3D9Surface
2020-01-24 00:27:09 +00:00
Philip Rebohle
81c3daa3d0
[dxvk] Remove image renaming
...
Broken by design, has to be implemented by client APIs instead.
2020-01-23 22:21:45 +01:00
Florian Will
0b3f9718c9
[d3d9] Fix some off-by-one TSS types enum values
...
They are 0-based instead of 1-based, and therefore supposed to be
off-by-one compared to D3DTEXTURESTAGESTATETYPE, but three values in the
enum are actually off-by-two.
For me, this fixes some odd rail rendering in ZUSI 3.
Fixes: 7d0ddc4b
2020-01-23 17:26:51 +00:00
Joshua Ashton
792c74e1d9
[d3d9] Fix texture stage index in stateblocks
...
Fixes minimap transparency in FHX https://github.com/Joshua-Ashton/d9vk/issues/306
2020-01-23 02:19:43 +00:00
Joshua Ashton
7d0ddc4b3b
[d3d9] Remap texture stage state types onto our own enum
...
Fits us nicely into a dword for captures while not exclusing D3DTSS_CONSTANT
2020-01-23 02:05:09 +00:00
Joshua Ashton
a1cad25a51
[d3d9] Remove unnecessary loops for some stateblocks applications
2020-01-23 02:05:09 +00:00
Joshua Ashton
ff2c6a076f
[d3d9] Fix opSelect condition vector size
...
Fixes invalid fixed function shaders
2020-01-22 22:54:27 +00:00
Joshua Ashton
35a9934cde
[d3d9] Make unbound textures return (0, 0, 0, 1) (fixed func)
...
Fixes sky in Ferentus Herrcot Xiones
https://github.com/Joshua-Ashton/d9vk/issues/306
2020-01-18 03:10:47 +00:00
Philip Rebohle
caae5d18ed
[d3d9] Remove unused variable
...
Fixes a compiler warning.
2020-01-17 18:04:09 +01:00
Philip Rebohle
609856db35
[d3d9] Create front buffer
2020-01-17 18:04:09 +01:00
Philip Rebohle
f20a3c07fb
[d3d9] Don't create sRGB views for non-sRGB compatible textures
...
Otherwise we end up creating views with VK_IMAGE_FORMAT_UNDEFINED.
2020-01-17 17:47:08 +01:00
Philip Rebohle
296aacb23e
[d3d9] Return specific image view from GetSampleView
...
Lets us have pick the sRGB-ness of the view in one place. Needed
for the next patch.
2020-01-17 17:47:08 +01:00
Philip Rebohle
905d69e77b
[d3d9] Don't pass format mapping to D3D9CommonTexture
...
Instead, infer it from the format. This is basically being done
already, however the mapping we pass in is not correct if the
image format is Unknown.
2020-01-17 17:47:08 +01:00
Philip Rebohle
7e35a0687b
[d3d9] Don't enable DrawParameters capability
...
Not used in D3D9 shaders.
2020-01-17 17:46:59 +01:00
Joshua Ashton
b954ab886f
[d3d9] Implement GetFrontBufferData (currently with first backbuffer)
...
Fixes screenshots in ATi ToyShop demo
2020-01-17 06:01:48 +00:00
Joshua Ashton
e5df573292
[d3d9] Add AreFormatsSimilar helper
2020-01-17 05:55:47 +00:00
Joshua Ashton
9fce945b62
[d3d9] Don't create views if we are a null resource
2020-01-17 04:20:05 +00:00
Philip Rebohle
eb37dfa8d2
[d3d9] Create multiple back buffers for GetBackBuffer API
...
Needed by Atelier Sophie.
2020-01-16 18:50:23 +01:00
Philip Rebohle
c911784bb8
[d3d9] Synchronize with presentation in D3D9SwapChainEx::Reset
...
Otherwise, the subsequent patches would break if Reset is called
while there's still a frame in flight.
2020-01-16 18:50:23 +01:00
Joshua Ashton
9e5e4c1cfc
[d3d9] Don't mark for hazards if we aren't rendering to mip 0
2020-01-16 03:04:58 +00:00
Joshua Ashton
7c53a997ef
[d3d9] Keep subresource views in subresources, defer creation until needed
...
Avoid creating a bunch of views that we probably don't need whenever a texture is created
2020-01-16 03:00:31 +00:00
Joshua Ashton
64ece36349
[d3d9] Implement d3d9.forceSwapchainMSAA
...
Works good enough for some titles like Vampire The Masquerade: Bloodlines.
2020-01-11 02:34:37 +00:00
Joshua Ashton
3ebd4b28a3
[d3d9] Defer dialog mode swapchain recreation decision to Present
...
Avoids unnecessary swapchain recreations if the game calls SetDialogBoxMode multiple times per frame
2020-01-10 04:30:55 +00:00
Joshua Ashton
9647e449d2
[d3d9] Remove redundant logging from SetDialogBoxMode
...
This path doesn't error anyway...
2020-01-10 04:30:02 +00:00
Philip Rebohle
79fcaa9fba
[d3d9] Remove unused variable from D3D9DeviceEx::Clear
...
Fixes a compiler warning.
2020-01-09 18:06:58 +00:00
Joshua Ashton
47555f1dda
[d3d9] Add GetSurfaceExtent helper
2020-01-09 03:29:58 +00:00
Joshua Ashton
cd58b147a1
[d3d9] Respect mip != 0 for Clear fastpath
2020-01-09 03:24:50 +00:00
Joshua Ashton
ebcab68822
[d3d9] Respect specific mip size for implicit viewport in SetRenderTarget
...
Closes #1295
2020-01-09 03:19:37 +00:00
Joshua Ashton
b738c4220b
[d3d9] Scale depth bias value based on current format's r
value
2020-01-08 19:38:18 +00:00
Joshua Ashton
2d7f4b1a2c
[d3d9] Set depth bias values separately, optimize redundant rasterizer state changes
2020-01-08 19:38:18 +00:00
Joshua Ashton
9541aef0b8
[d3d9] Ensure D3DDISPLAYMODEEX we use to call the Ex funcs has its size set correctly
2020-01-06 04:14:02 +00:00
Joshua Ashton
61b6f8f297
[d3d9] Hook up GetAdapterDisplayMode to resp. adapter func
...
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
2020-01-06 04:07:02 +00:00
Joshua Ashton
91574993df
[d3d9] Return current display mode in GetAdapterDisplayModeEx rather than last mode
...
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
2020-01-06 04:06:45 +00:00
Joshua Ashton
845ab2b5af
[d3d9] Don't re-set dialogbox mode on swapchain Reset
...
There's no reason to do this now that we have no error path in SetDialogBoxMode...
2020-01-04 21:12:53 +00:00
Joshua Ashton
d53b3adaea
[d3d9] Remove incorrect error returns SetDialogBoxMode
...
The Microsoft docs for this are incorrect based on my tests of all the described edge-cases.
https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-setdialogboxmode
2020-01-04 21:10:26 +00:00
Joshua Ashton
c024b89171
[dxso] Implement d3d9.forceSamplerTypeSpecConstants
...
This option makes us always use a spec constant to determine sampler type (instead of just in PS 1.x)
which works around a game bug in Halo CE where it gives cube textures to 2d/volume samplers
2020-01-01 20:56:05 +00:00
Joshua Ashton
ff129abaf0
[d3d9] Fix crash when trying to present with a currently invalid presenter
...
Closes #1304
2019-12-28 01:27:18 +00:00
Joshua Ashton
b4f2094c02
[d3d9] Enable bounds testing for D3DPOOL_SYSTEMMEM buffers
...
Improves performance in Halo CE.
2019-12-22 19:05:22 +00:00
Joshua Ashton
fb4d794412
[d3d9] Use VK_FORMAT_D24_UNORM_S8_UINT for D3DFMT_DF24
...
May improve performance in some instances
2019-12-22 01:46:50 +00:00