Philip Rebohle
b838b65516
[d3d9] Correctly mask alpha reference push constant
...
We accidentally lost this during the rework, since the initial
implementation scaled the alpha ref value on the CPU.
Fixes #3123 .
2022-12-06 21:25:55 +00:00
Robin Kertels
522909b165
[d3d9] Don't set NeedsReadback when dirtying mip maps
...
It's impossible to lock non 0 mips anyway.
2022-12-03 15:18:40 +00:00
Robin Kertels
4796eb0b0d
[d3d9] Implement capturing lights in state blocks
2022-11-21 16:06:49 +00:00
Robin Kertels
d0a10cc9f8
[d3d9] Handle DS texture uploads
2022-11-21 15:59:25 +00:00
Robin Kertels
3393c5f4ff
[d3d9] Only upload mip 0 of managed automipgen textures
2022-11-19 17:34:02 +00:00
Robin Kertels
8a2e4ef481
[d3d9] Allow locking DEFAULT pool based on texture type
2022-11-10 13:37:52 +01:00
Christopher Egert
e30b783505
d3d9: Use a different rvalue for depth bias on NV
2022-11-09 01:15:00 +00:00
Robin Kertels
ecc2302389
[d3d9] Fix query reset counter underflow
2022-11-07 23:34:32 +00:00
Philip Rebohle
03dca539cb
[vulkan,d3d9,d3d11] Move surface creation to swap chain implementation
2022-11-07 14:14:05 +01:00
Robin Kertels
d8933ca175
[d3d9] Only do one allocation for all texture subresources
2022-11-06 19:35:03 +00:00
Robin Kertels
4fb7acc64e
[d3d9] Implement converter for W11V11U10
2022-11-06 02:55:29 +00:00
Adam Jereczek
0462454d2b
Fix for saving vertex shader constants with a StateBlock
...
Co-authored-by: aroztkow <aneta.roztkowska@intel.com>
2022-10-31 18:16:15 +00:00
Robin Kertels
0fc5c84e7b
[d3d9] Don't advertise support for MS INTZ format
2022-10-30 21:50:44 +00:00
Georg Lehmann
bc31ebe151
[d3d9] Fix OptimizeLayout with feedback loop usage.
...
We kind of need dcc on GFX8/9.
2022-10-29 11:21:55 +02:00
Robin Kertels
9c22a58543
[d3d9] Disable locking non-dynamic default textures
2022-10-24 20:55:00 +01:00
Robin Kertels
d771f7cf8f
[d3d9] Remove dead fields
2022-10-24 20:55:00 +01:00
Philip Rebohle
494e01b353
[d3d9] Avoid querying environment variables on shader creation
2022-10-24 18:01:48 +02:00
Philip Rebohle
859de7e828
[dxvk] Always enable depth clip feature if supported
2022-10-24 16:39:24 +02:00
Joshua Ashton
1d3decf100
[build] Add version scripts for native builds
...
FEX would like clean symbols for experimenting with making thunks down the line.
We also just shouldn't be exporting a bunch of random crap -- sadly -fvisibility=hidden doesn't help with a bunch of stuff :(
For reference, RADV also does this.
2022-10-15 19:10:57 +02:00
Joshua Ashton
25798f6fe1
[build] Set name_prefix to libdxvk_
for native builds
...
Less rude and nicer than just d3d9.so.
Matches old DXVK native behaviour too.
2022-10-15 19:10:57 +02:00
Robin Kertels
4bcabe8d46
[d3d9] Return 0 if any vertex decl element can't be represented as fvf
2022-10-12 23:07:23 +01:00
Robin Kertels
7090105573
[d3d9] Remove declaration fvf mapping log spam
2022-10-12 23:07:23 +01:00
Robin Kertels
2b964f0c67
[d3d9] Make MapD3DDeclToFvf more readable
...
All branches return, so we might as well
give it a bit more room to breath.
2022-10-12 23:07:23 +01:00
Adam Jereczek
b2ad25755a
[d3d9] Fix for missing restriction check in ProcessVertices
...
Co-authored-by: aroztkow <aneta.roztkowska@intel.com>
2022-09-28 12:10:41 -02:30
Joshua Ashton
49854dbfba
[d3d9] Saturate viewport depth range
...
Viewport depth range in D3D9 is clamped at 0-1, same as OpenGL.
Drivers like RADV, etc support VK_EXT_depth_range_unrestricted,
which makes the regular UB of this actually work -- which isn't what
we want.
We also don't enable VK_EXT_depth_range_unrestricted, so we shouldn't
be setting depth ranges outside of the 0-1 bounds anyway.
Closes : #2960
2022-09-27 18:58:40 -02:30
Georg Lehmann
50857537d6
[d3d9] Use D32 not D32_S8 when upgrading formats without stencil aspect.
2022-09-27 18:58:32 +01:00
Georg Lehmann
a9bdea72e9
[d3d9] Clamp Dref to [0.0, 1.0] if the texture is emulated UNORM
2022-09-26 21:39:51 +01:00
Georg Lehmann
6fe96d7d82
[dxso] Support clamping Dref.
2022-09-26 21:39:51 +01:00
Georg Lehmann
5684e29718
[d3d9] Track if a texture is upgraded to D32f
2022-09-26 21:39:51 +01:00
Georg Lehmann
6188ffa23a
[d3d9] Add a config option for D24 -> D32
2022-09-26 21:39:51 +01:00
Joshua Ashton
f2950953e0
[d3d9] Avoid depth degenerate viewports
2022-09-23 13:26:50 +01:00
Joshua Ashton
d221bb7a9c
[d3d9] Add ID3D9VkInteropDevice
...
Provides access to the device and instance handles
as well as the queue that is used for rendering.
2022-09-22 17:58:54 +01:00
Joshua Ashton
e976218e17
[d3d9] Make GetDXVKDevice return a const Rc reference
...
Avoids some useless reffing.
2022-09-22 17:58:54 +01:00
Joshua Ashton
ac13112619
[d3d9] Add ID3D9VkInteropTexture
...
Provides access to the backing resource of a D3D9 texture.
2022-09-22 17:58:54 +01:00
Joshua Ashton
ae2465079e
[d3d9] Add ID3D9VkInteropInterface
...
Allows getting the VkInstance handle from a IDirect3D9 interface,
as well as VkPhysicalDevices from adapter ordinals.
2022-09-22 17:58:54 +01:00
Joshie
1451032b83
[d3d9] Minor cleanups in vertex declaration code ( #2950 )
2022-09-22 09:46:51 +00:00
Krzysztof Dobrowolski
1e1ef8f1bd
[d3d9] Fix for missing mapping of VertexElements declarations to FVF bits
...
When Vertex declaration is created by CreateVertexDeclaration
and SetFVF is not called then GetFVF returns 0.
This code change implements mapping of D3D declarations to FVF mask
and sets it if FVF was not set previously.
2022-09-22 08:41:40 +00:00
Philip Rebohle
4fb6c200d7
[d3d9] Use precise matrix-vector operations to compute vertex position
2022-09-16 20:04:01 +01:00
Philip Rebohle
b56ec10deb
[d3d9] Add helpers for precise matrix-vector products
2022-09-16 20:04:01 +01:00
Paul Gofman
10d6e15646
[d3d9] Do not set window size and position when restoring from fullscreen state
...
Closes #2920 .
2022-09-15 09:33:24 +01:00
Krzysztof Dobrowolski
19b76825d0
[d3d9] Fix for missing restriction check in UpdateSurface.
...
The spec of IDirect3DDevice9::UpdateSurface contains the following restriction:
- Neither surface can be created with multisampling.
The only valid flag for both surfaces is D3DMULTISAMPLE_NONE.
This commit adds this check and returns D3DERR_INVALIDCALL
when source or destination surfaces are multisampled.
2022-09-15 09:32:31 +01:00
Philip Rebohle
3a636f6094
[dxvk] Introduce DxvkFormatQuery
2022-09-11 16:40:02 +02:00
Joshua Ashton
10bb285f2e
[d3d9] Remove unused dstExtent + friends in GetRenderTargetData
2022-09-10 21:46:07 +00:00
Joshua Ashton
b0ac267fd5
[d3d9] Explicitly cast to D3DRENDERSTATETYPE in ColorWriteIndex
...
Need this to silence warnings after doing some arithmetic on an enum.
2022-09-10 21:27:04 +00:00
Georg Lehmann
bd5d9d90c9
[d3d9] Use xor to swap bit in depth mask.
2022-09-10 04:16:30 +00:00
Georg Lehmann
1bc6f9660a
[d3d9] Force D3DTADDRESS_CLAMP for cubes.
2022-09-10 04:16:30 +00:00
Philip Rebohle
4b8387c9b1
[d3d9] Set host stage and access bits for image staging buffers
...
This is already being done for buffers.
2022-09-08 19:26:55 +02:00
Joshua Ashton
c49b1ee390
[d3d9] Use SetStateTexture in Reset
...
Fixes m_activeTextures not getting updated
2022-08-29 10:16:21 +00:00
Robin Kertels
bfd47ec876
[d3d9] Try to match either top or bottom mips in UpdateTexture
2022-08-26 20:56:42 +01:00
Philip Rebohle
2329c71b6f
[dxvk] Implement sampler reduction mode
2022-08-26 05:53:03 +02:00