Anthony
16c449ddc7
Drop Handle <-> EmuHandle conversion step
2021-02-25 22:48:00 +13:00
Anthony
f818e43fc7
- use read/write locking via shared_mutex
...
- lock in IsEmuHandle
2021-02-25 22:02:41 +13:00
Anthony
7c51e2e34b
Use lock_guard instead of explicit lock/unlock
2021-02-25 21:38:24 +13:00
Anthony
3dd4ca7349
Implement IsEmuHandle by keeping a lookup of EmuHandle objects
...
Fixes a crash in Amped on loading a map after having exited one
Amped requests an invalid handle 0xFDFDFDFD
IsEmuHandle return a false positive and we'd crash trying to call NtClose()
2021-02-25 21:10:55 +13:00
ergo720
1b2308f3e1
Removed redundant allocate functions
2021-02-20 00:46:56 +01:00
ergo720
240dc03dd5
Add support for mouse input as cursor position relative to the rendering window
2021-02-11 17:31:22 +01:00
ergo720
07b4738e97
Review remarks
2021-02-09 12:36:14 +01:00
ergo720
cd362b6383
Avoid a crash when changing the device type at runtime in the input gui
2021-02-09 12:33:00 +01:00
ergo720
f750b2e4f2
Fixed some tab/space issues and comments
2021-02-09 12:33:00 +01:00
ergo720
9c1c61f191
Deleted XapiCxbxr.h
2021-02-08 22:37:29 +01:00
ergo720
769444f91c
Deleted old vsbc project
2021-02-08 22:37:29 +01:00
ergo720
6a54aa5573
Add Steel battalion controller support to input gui
2021-02-08 22:37:29 +01:00
LanHikariDS
689e3ca93c
Very belated rebase, as well as progress on the UI and Git resolutions
2021-02-08 22:37:29 +01:00
Anthony
d9a2e7a715
CxbxUpdateHostTextureScaling accounts for multisampling
...
Fixes Max Payne 2 bullet time
which uses MSAA and the backbuffer as a texture
2021-02-08 03:51:13 +13:00
Anthony
d7c9e78195
GetScreenScaleFactors ignores multisample scale when using Xbox the fixed function pipeline.
2021-02-08 03:51:13 +13:00
Luke Usher
f390c79bdf
Merge pull request #2014 from NZJenkins/experiment/fixedfunc3
...
HLSL fixed function implementation
2021-01-31 09:27:19 +00:00
Luke Usher
3abddb5983
vs: use model 2.a primarily, with 3.0 fallback
2021-01-29 20:31:46 +00:00
Anthony
24b38ae3b3
Point sprite fixes
...
* Implement Min and Max
* Account for upscaling
2021-01-27 22:48:06 +13:00
Anthony
5441dbff1c
Fix LocalViewer again, and move it to where it's used
2021-01-27 22:48:06 +13:00
Anthony
8a5c9a6445
Consolidate lighting calculations
2021-01-27 22:48:06 +13:00
Anthony
c722d80503
Get view transform from transform state
2021-01-27 22:48:05 +13:00
Anthony
54e0c08ef1
Let MultiplyTransform call SetTransform
...
Detect if it didn't
2021-01-27 22:48:05 +13:00
Anthony
c77582524d
Fix incorrect toViewer vector when LocalViewer is enabled
2021-01-27 22:48:05 +13:00
PatrickvL
134dd70117
Optimize away SpecularEnable and PointScaleEnable, by resetting the related variables on CPU.
...
This shaves off almost 50 vertex shader instructions (down to 705 with this).
2021-01-27 22:48:05 +13:00
PatrickvL
bd76d67c78
Indentation fixes & add a 'const' prefix to all single-assigned variables, and 'static' for all literal assignments.
2021-01-27 22:48:05 +13:00
PatrickvL
39e91ffec6
Fixed Function HLSL : Optimized ColorVertex handling in DoMaterial, by removing it's check froM HLSL, and replace that by CPU replacing all MaterialSource's with D3DMCS_MATERIAL when X_D3DRS_COLORVERTEX is disabled. This shaves off 13 vertex shader instructions.
2021-01-27 22:48:05 +13:00
PatrickvL
0245cc6ee8
Optimized vertex blending by only recalculating the required world/view matrices, and a simplified HLSL implementation
2021-01-27 22:48:05 +13:00
PatrickvL
8200cd8e43
Fixed Function : Extract method D3D8TransformState::RecalculateDependentMatrices, called via two getters using a dirty boolean, preventing needless recalculations.
2021-01-27 22:48:05 +13:00
PatrickvL
8b8d1e0d39
Fixed Function : Fixed CXBX_ALL_TEXCOORD_INPUTS build, avoid ambiguous symbol redeclaration
2021-01-27 22:48:05 +13:00
Anthony
43be445c37
Copy constants regardless of dirty state
2021-01-27 22:48:05 +13:00
Anthony Miles
b4685c1dc2
Initialize all registers for fixed function mode
2021-01-27 22:48:05 +13:00
Anthony Miles
f98d040a65
Enable fixed function vertex shader
...
- Various bits of glue code
- Toggle Shader/D3D9 with F2
- Replace vertex shader mode flags with enum
2021-01-27 22:48:05 +13:00
Anthony
5720444c6b
Fix normal transformations
...
- Keep track of transforms set by the title
- Transform normals by the inverse transpose of the position transform
- X_D3DTRANSFORMSTATETYPE enum
2021-01-27 22:48:05 +13:00
Anthony Miles
3bfad0327f
Xbox fixed function vertex shader (not yet enabled)
...
The shader should behave similarly to D3D9's fixed function pipeline
But supports Xbox extensions and helps to move off D3D9
Co-authored with PatrickVL
2021-01-27 22:48:05 +13:00
Anthony Miles
99a96e675d
Add FixedFunctionState to keep track of D3D fixed function lights
2021-01-27 22:48:05 +13:00
Anthony Miles
ddc62ad00e
Extract HLSL compilation to a method
2021-01-27 22:48:05 +13:00
Anthony
20549fec19
Ensure WM_PAINT is handled correctly
...
Otherwise, Windows will send WM_PAINT messages non-stop and burn CPU doing nothing
This fixes an odd behaviour where moving the mouse over the window could increase FPS
2021-01-26 20:08:58 +13:00
NZJenkins
515df2b533
Revert "Initialize vertex shader outputs to vertex shader attribute values"
2021-01-21 21:59:51 +13:00
Anthony
d7f0957cba
Note why LOG_TEST_CASE is where it is
2021-01-19 01:47:02 +13:00
Anthony
ce369a6259
PR cleanup
...
* Create index cache size variable
* Use std::optional
* Make PreviousStates a class variable
* Remove double-cast
* Use LOG_TEST_CASE in VertexShaderSource
Also move LOG_TEST_CASE to CxbxKrnl.h since it's unuseable from Logging.h
2021-01-19 00:32:56 +13:00
Anthony
27dbf03743
Only parse a vertex shader if we can't find it in the cache
...
Try to clean up and rationalize some things along the way
* GetVshFunctionSize lets us hash an Xbox vsh function, so we can check the cache before trying to parse it
* Consider that the vertex shader header won't be passed to the shader parsing code anymore:
Combine header/headerless paths in EmuParseVertexShader
Drop Header information from IntermediateVertexShader as it's no longer used
Remove EmuGetShaderInfo which looked at the header
* Make XboxVertexShaderDecoder static method in a namespace
2021-01-17 20:26:44 +13:00
Anthony
301205051b
Increase vertex buffer cache size
...
Improves performance in Crash Nitro Kart, which did more draws per frame than the cache size.
2021-01-17 20:25:48 +13:00
Anthony
363d91faff
Expand the index cache to a generous size
...
This seems to slightly increase performance in Crash Nitro Kart
which can do ~4000 draws per frame
2021-01-17 20:25:48 +13:00
Anthony
8eeb061a42
Avoid setting texture states to the same value they already are
...
This improves performance in Crash Nitro Kart
2021-01-17 20:25:48 +13:00
Luke Usher
e0f41fe6f7
Merge pull request #2117 from NZJenkins/clear-fix
...
Ensure the xbox viewport is applied when Clear is called
2021-01-11 08:11:00 +00:00
Silent
55932e5493
Split D3DDevice_LoadVertexShader_0 into two OOVPAs
...
XDK-5849 version of this LTCG function passes arguments in EAX and EDX
2021-01-10 15:48:05 +01:00
Anthony
38a0f82980
Ensure the xbox viewport is applied when Clear is called
...
This fixes an issue introduced in 46ec7516fa
The xbox viewport was applied in UpdateNativeD3DResources instead of the SetViewport patch, so wouldn't be applied until a Draw call.
Crash Tag Team Racing graphics would be blacked out whenever the rear view mirror appeared on the screen.
2021-01-11 00:06:15 +13:00
x1nixmzeng
9e05b3342d
Log a fatal message if registering a host device fails
2021-01-02 00:20:32 +00:00
x1nixmzeng
dfe9a19b0d
Fixed path registration on write protected drives
2021-01-01 15:52:49 +00:00
PatrickvL
4ff30fff20
Merge pull request #2071 from RadWolfie/dsound-status-debug
...
Add Basic DSound Stats to Log Output
2020-12-31 08:41:50 +01:00