Commit Graph

7440 Commits

Author SHA1 Message Date
PatrickvL 29017db910 In DxbxUpdateActivePixelShader, transfer values step by step, instead of using a switch/case loop.
Also, working towards removing host SetTextureStageState calls (doesn't work yet).
2021-06-07 10:58:36 +02:00
PatrickvL 2990552230 Fixes after rebase 2021-06-07 10:58:35 +02:00
PatrickvL b72b52a4a2 RenderState mapping table review remarks (nothing functional) 2021-06-07 10:58:35 +02:00
PatrickvL 4517f36456 Unrelated to PS :
UpdateFixedFunctionVertexShaderState now derives TexCoordComponentCount from GetXboxVertexAttributeFormat, which makes it honor overrides.

This could fix corrupted textures when Fixed Function HLSL is used together with VertexStream override modes.
2021-06-07 10:58:34 +02:00
PatrickvL 609a4d3276 [WIP] Xbox register combiner to HLSL pixel shader 2021-06-07 10:58:33 +02:00
PatrickvL 1e6845c940 Generalized HLSL shader compilation 2021-06-07 10:58:32 +02:00
Luke Usher f6e54acf17
Merge pull request #2231 from NZJenkins/sleeps
SleepPrecise for more accurate sleeps
2021-06-07 09:45:56 +01:00
Luke Usher da7a917ec5
Merge pull request #2232 from NZJenkins/ff-state2
Avoid unnecessary shader constant updates
2021-06-07 08:46:57 +01:00
Anthony 7d672600bb Update dirty shader constants only
And try to minimize D3D9 calls
Constants are synced every draw, but titles may only use a few constants
so we can potentially save a lot of work
Increases performance a little (at least on certain titles like Buffy)
2021-06-06 23:15:38 +12:00
Anthony 0cb849a3f8 Avoid setting vertex shader constants more than once per draw 2021-06-06 22:49:58 +12:00
Anthony 3b1daf52ab Addd braces 2021-06-02 22:38:43 +12:00
Anthony 76eb475ed6 Move SleepPrecise to Timer 2021-06-02 22:36:40 +12:00
Anthony b66f04d811 SleepPrecise for more accurate sleeps
We can use it to reduce the amount of spin waiting which burns CPU
Try to sleep as much as we can get away with without overshooting, and then spin wait
Use it for
- VBlank timing
- Frame limiter timing
2021-06-02 21:54:02 +12:00
PatrickvL 8087b157e5
Merge pull request #2222 from ergo720/rawinput
Add controller hotplug support
2021-05-28 16:54:30 +02:00
ergo720 917bf50482
Merge pull request #2224 from Margen67/sdl2
Use official SDL2 repository
2021-05-24 16:45:12 +02:00
ergo720 f3251128e8 Fixed an issue where xinput devices were bound to the wrong xbox port under some circumstances after hotplug removal events 2021-05-24 12:11:09 +02:00
ergo720 1ed640a0d7 Add controller hotplug support 2021-05-24 12:11:08 +02:00
Margen67 55ada8d50d Use official SDL2 repository 2021-05-23 02:06:50 -10:00
ergo720 5d222c10a0
Merge pull request #2221 from jackchentwkh/ImageDescWithRebaseAddress
Keep ImageBuffer backup copy, handle ImageDesc with rebase address, Fix Otogi 1, Otogi 2, PGR2 booting.
2021-05-21 19:38:41 +02:00
ergo720 8cc4b10ce0 Added test case + fixed a macro redefinition warning 2021-05-21 19:25:22 +02:00
Luke Usher df22c8baed
Merge pull request #2210 from RadWolfie/fix-chihiro-support
Few fixes toward title mount path and prepped for chihiro work
2021-05-21 17:56:57 +01:00
ergo720 2e1ed31aaa Untabfied code and update code style 2021-05-21 13:08:57 +02:00
jackchentwkh a665cf1f8e Replace host CreateFile/GetFileSize/ReadFile/Close with xbox::NtCreateFile/NtQueryFile/NtReadFile/NtClose. Add necessary error check logic, Add logic for loading image file from xbe section in case we encounter such guest code, alghough highly unlikely. Basicaly reversed from PGR2's code. 2021-05-21 13:28:13 +08:00
jackchentwkh d49762d27e Rebase Code and State Segments in EffectMaps. fix PGR2 2021-05-19 19:20:39 +08:00
RadWolfie 8d725a689c kernel: rename tmp_buffer to p_default_mount_path 2021-05-18 16:07:56 -05:00
RadWolfie 08dd615d37 review remarks 2021-05-18 16:05:13 -05:00
RadWolfie cf3655bed1 fix g_hCurDir issue by auto-bind to D letter when symbolic link is called occur 2021-05-18 15:48:19 -05:00
RadWolfie d8eb26fbda kernel: fix chihiro support 2021-05-18 15:48:18 -05:00
RadWolfie 9eadb8d393 remove unused code 2021-05-18 15:48:18 -05:00
Luke Usher cec1b0b885
Merge pull request #2215 from NZJenkins/ivb-float4
Change IVB to an array of 4-float slots
2021-05-17 16:55:04 +01:00
PatrickvL 9d601299ad In CxbxImpl_SetVertexData4f, call CxbxSetVertexAttribute *after* detecting Register X_D3DVSDE_VERTEX, and updating it to X_D3DVSDE_POSITION, to avoid needless "Register < 0" logging, and to have current position values written to the NV2A vertex attribute value buffer. 2021-05-17 14:51:03 +02:00
Anthony b0b47ab744 Initialize vertex attribute format once 2021-05-17 19:12:54 +12:00
Anthony 867a0b1045 Fix 'NumVertexIndices' instead of 'NumVertices'
and tidy
2021-05-16 22:11:48 +12:00
Anthony 0453e451f1 Change IVB to an array of 4-float slots
Will fix Halo logo and menu text rendering (once it's visible!)
- Remove references to fixed function concepts, since slots might contain anything
e.g. don't exclude the 4th component of the slot corresponding to NORMAL in fixed function mode
- Use the IVB table directly for simplicity. Copy all table data to the vertex buffer
2021-05-16 22:11:48 +12:00
jackchentwkh a04a079f19 Adding code to allocate memory for ImageDesc and copy ImageDesc from DSP ImageBuffer.
Tested with Otogi, success.
2021-05-16 15:42:44 +08:00
PatrickvL a5f4b3b494
Merge pull request #2217 from ergo720/SetWindowText
Removed unnecessary calls to SetWindowText
2021-05-14 15:45:27 +02:00
ergo720 c769dce20e Removed unnecessary calls to SetWindowText 2021-05-14 12:01:27 +02:00
RadWolfie 2397ece059
Merge pull request #2214 from Margen67/actions
CI.yml: Use cmake -B
2021-04-30 04:52:51 -05:00
Margen67 12f2237c79
CI.yml: Use cmake -B 2021-04-29 23:32:10 -10:00
PatrickvL 8a4c7469e6
Merge pull request #2211 from RadWolfie/fix-cmake-installs
Remove extra projects we don't need at all and add SDL2 binary to be install
2021-04-30 10:32:27 +02:00
Luke Usher 7a6983478f
Merge pull request #2213 from ergo720/fatal_msg
Reworded fatal error message popup
2021-04-30 08:02:55 +01:00
ergo720 d74a9a1dfb Removed the original message, because it's already printed by EmuExceptionPrintDebugInformation 2021-04-29 19:15:09 +02:00
ergo720 2d10c1ffe2 Also print exception code and address 2021-04-29 19:15:09 +02:00
ergo720 a95636afcd Reworded fatal error message popup 2021-04-29 19:15:09 +02:00
Luke Usher dff5fb04cc
Merge pull request #2209 from CookiePLMonster/xdk-5849-stream-source
Add a new LTCG variation of D3DDevice_SetStreamSource
2021-04-29 16:02:08 +01:00
Silent 1e92046b0b
Add a new LTCG variation of D3DDevice_SetStreamSource
Found in Juiced.
2021-04-28 17:26:14 +02:00
RadWolfie 3554d8ef03 cmake: remove extra projects we don't need at all and add SDL2 binary to be install 2021-04-27 09:26:38 -05:00
PatrickvL b6d4c76b42
Merge pull request #2207 from scribam/ninja
cmake: Fix format for Ninja generator
2021-04-26 22:01:02 +02:00
scribam ea434d9cf2 cmake: Fix format for Ninja generator 2021-04-26 18:26:24 +02:00
PatrickvL 1034185a62
Merge pull request #2206 from medievil1/createdevice
check for null device
2021-04-23 23:36:53 +02:00