Commit Graph

5278 Commits

Author SHA1 Message Date
Philip Rebohle 494e01b353 [d3d9] Avoid querying environment variables on shader creation 2022-10-24 18:01:48 +02:00
Philip Rebohle b055c2daea [d3d11] Avoid querying environment variables on shader creation 2022-10-24 17:58:57 +02:00
Philip Rebohle fea86ef116 [dxvk] Use dynamic depth clip enable for linked pipelines if supported
This way we won't have to compile any vertex shader pipelines twice.
2022-10-24 16:39:24 +02:00
Philip Rebohle 8e7ea899d2 [dxvk] Enable VK_EXT_extended_dynamic_state_3 if available 2022-10-24 16:39:24 +02:00
Philip Rebohle 859de7e828 [dxvk] Always enable depth clip feature if supported 2022-10-24 16:39:24 +02:00
Philip Rebohle a6ede3e0c2 [meta] Update Vulkan headers to 1.3.231 2022-10-24 16:39:24 +02:00
Georg Lehmann ae764333f4 [build] Use glslang with --depfile to rebuild on header changes 2022-10-21 17:04:47 +02:00
Georg Lehmann 2653628041 [build] Always use glslang with --quiet
We depend on a new enough glslang anyway.
2022-10-21 17:04:47 +02:00
Paul Gofman e311f25287 [dxgi] Store device pointer in DxgiSwapChainDispatcher 2022-10-20 19:05:19 +02:00
Philip Rebohle 53a0c3726c [dxvk] Don't crash immediately on pipeline library compile error
Things will blow up down the line but there's no good reason to crash
immediately. Also ignore returned pipeline on error so we'll always
return null.
2022-10-18 00:07:41 +02:00
Philip Rebohle 69d7af42a4 [dxgi] Change swap chain interface to better map to D3D12 needs 2022-10-16 16:38:29 +02:00
Philip Rebohle d7ac21b6c7 [dxgi] Use new DXVK swap chain factory if available 2022-10-16 16:38:29 +02:00
Philip Rebohle aca67f64da [d3d11] Implement IDXGIVkSwapChainFactory for D3D11 2022-10-16 16:38:29 +02:00
Philip Rebohle 580dd5cf4a [dxgi] Add swap chain factory interface definition 2022-10-16 16:38:29 +02:00
Joshua Ashton fc3d04c1c9 [meta] Fix opt_strip in package-native.sh 2022-10-15 18:25:19 +01:00
Joshua Ashton be9687f396 [meta] Fix --dev-build on package-native.sh
Re-add the suffix to the build dir.
2022-10-15 18:18:52 +01:00
Joshua Ashton d83e184afd [d3d10] Enable native builds
This started working at some point... may as well!
2022-10-15 18:17:29 +01:00
Joshua Ashton eea77b845f [meta] Add CI for native builds in Steam Runtime Sniper 2022-10-15 18:11:34 +01:00
Joshua Ashton 2484dac34a [meta] Add package-native.sh 2022-10-15 18:11:34 +01:00
Joshua Ashton 1157b235cc [build] Specify static libgcc/stdc++ on native
We don't have any interfaces that rely on the c++ abi. Makes our builds more portable.

Means that our builds in Sniper can be used on games that are still forcing the old C++03 string abi.
2022-10-15 19:10:57 +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
Christophe f1578b8ed3
[meta] Factorize history and contributors sections using schema 0.8.1 2022-10-15 17:24:44 +01:00
Joshua Ashton 3b90f5a77f [util] Enable apitrace mode for Hammer World Editor 2022-10-15 17:21:29 +01:00
Jens Peters c54eac7d61 [build] Update github actions
Use github-checkout v3, github-upload-artifact-action v3 and joshua-ashton-gcc-problem-matcher v2.
Fixes Node.js 12 deprecation warning.
2022-10-14 09:32:51 +01: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
Philip Rebohle bd7d2aac71 [dxgi] Get rid of NotifyModeChange method
Was only used for the FPS limiter.
2022-10-07 13:25:56 +02:00
Vinjul1704 038ed23a5d [util] Force SM1 for the Escape from Tarkov launcher 2022-10-06 21:32:19 +02:00
Joshua Ashton fa45e5838e [util] Fix tzcnt on ARM64 + Clang
This needed brackets around this conditional.
2022-10-05 19:01:05 +01:00
Philip Rebohle ab622760a0 [dxbc] Emit new block only after emitting switch instruction
Otherwise emitting the OpSwitch will reset the block ID, which
is not desireable. Fixes #2975.
2022-10-04 21:00:50 +02:00
Blisto91 f8bd19f210 [util] Cap Sonic Adventure 2 to 60 fps 2022-09-30 19:14:59 -02:30
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
Georg Lehmann 7552cfe62a [dxso] Always lower projection 2022-09-26 21:39:51 +01:00
Philip Rebohle f1f8d45fcd [dxvk] Rework allocation logic for large resources
This may reduce internal fragmentation with very large resources.

We previously changed behaviour to not do this in order to reduce memory
pressure in the average case, however by trying to suballocate from existing
chunks and falling back to a dedicated allocation on failure, rather than
allocating a new chunk, we can mostly avoid that situation.
2022-09-24 17:06:00 +02:00
Philip Rebohle 15588004b4 [dxvk] Bump memory chunk size to 256 MiB. 2022-09-24 17:06:00 +02: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
Joshua Ashton 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