Commit Graph

6419 Commits

Author SHA1 Message Date
Anish Moorthy 98a1c58db7 Make "Load state from" pressable on linux 2021-09-14 23:11:49 -04:00
Anish Moorthy 91b2e22894 Make "Save State To" pressable, even if sometimes broken 2021-09-14 23:11:49 -04:00
zeromus db6e978276
Merge pull request #466 from anlsh/master
Change background color on Linux
2021-09-14 18:38:35 -04:00
Anish Moorthy 19b081c8b8 Fix second layer of toolbar 2021-09-14 18:05:58 -04:00
rogerman d60684ce4d GPU Operations: Fix bug where generic calls to CopyLine*<>() caused certain compilers to interpret 0xFFFF as -1 in all cases.
- This fix has the side effect of greatly increasing the code size.
- Quick testing shows that this fix increases overall graphics performance by 2% - 3%. But is this small performance gain worth the massive increase in code size? Hmmm....
2021-09-14 14:49:31 -07:00
rogerman a948838c16 GPU: Native lines are no longer tracked through NDSDisplay. Native lines are now only tracked through GPUEngineBase.
- While this is technically incorrect according to object roles, tracking native lines this way makes it a bit easier to manage them.
2021-09-14 01:53:05 -07:00
Anish Moorthy 5057299fa5 Change background color on Linux 2021-09-13 23:40:18 -04:00
rogerman 7bac2ce759 GPU: Standardize all aligned memory block allocations to be page-aligned. 2021-09-13 19:36:27 -07:00
rogerman 8a610234c5 GPU: Simplify GPUSubsystem::PostprocessDisplay(). 2021-09-13 19:31:31 -07:00
rogerman a5b25313f8 GPU: The internal buffer for custom-sized layer IDs is now cleared in its entirety, rather than just most of it. 2021-09-13 19:30:47 -07:00
rogerman fffa7ebb8c FIFO: Oops! Fix a bug that snuck in from commit 31851c2.
- In practice, no games seemed to be affected by this bug, but even so, this fix is correct.
- While technically unnecessary, when the index is singly incremented, it's better to hard reset an overrunning index to zero in order to improve the theoretical stability of the code.
2021-09-13 10:42:39 -07:00
rogerman ad64e73bb2 Colorspace Handler: Colorspace conversions no longer do big-endian byte swapping by default. Instead, byte swapping must be explicitly requested.
- Byte swapping can now be independently controlled for both input and output data.
- As an application to this new API, VRAM display mode now shows the correct colors on big-endian systems.
2021-09-11 20:59:41 -07:00
rogerman 329eade565 FIFO: Simplify _DISP_FIFOrecv_LineOpaque32_vec() code paths for non-AltiVec systems. 2021-09-11 11:50:53 -07:00
rogerman bf71da494e Colorspace Handler: Make the ColorspaceConvert555To*_AltiVec() functions behave consistently with their scalar counterparts by byte swapping the result. Fixes SoftRasterizer's toon table colors on AltiVec-enabled systems. 2021-09-11 11:49:07 -07:00
rogerman 3dabb10145 OpenGL Renderer: The fog density table is now sampled as a 1D texture instead of being indexed as a uniform array. Should yield a performance improvement on older GPUs.
- Even if the new fog rendering yields no performance improvement on newer GPUs, at least the new code is MUCH cleaner and simpler.
2021-09-10 10:13:11 -07:00
rogerman df18eda84f OpenGL Renderer / SoftRasterizer: Properly handle cases where FogShiftSHR is greater than 10. Related to commit 9f4f3ec. 2021-09-09 19:54:06 -07:00
rogerman 9f4f3ecf95 GFX3D: Oops, I misread GBATEK. It actually meant that the Fog Step (not the Fog Shift) would become zero if Fog Shift was greater than 10. So set Fog Shift to 11 in this case.
- This also discovers an existing issue with the fog weight calculation code in both OpenGL and SoftRasterizer, since Fog Shift could be zero and thereby cause the calculations to divide by zero. This issue will have to be dealt with at a later time.
2021-09-09 13:59:25 -07:00
rogerman d9fabf6347 GFX3D: So apparently, GBATEK says that, instead of clamping the FogShiftSHR value to 10, the FogShiftSHR value should reset to 0 if it goes above 10. Hmm, okay. 2021-09-09 13:34:47 -07:00
rogerman c0552cab6d OpenGL Renderer: Do a micro-optimization when NDS-style Depth Calculation is used. 2021-09-08 23:42:29 -07:00
rogerman 506128760a Do some minor fixes in preparation for making an Apple Silicon build. 2021-09-08 15:07:02 -07:00
rogerman 9e79b1dcb3 OpenGL Renderer: Fog rendering now works like how SoftRasterizer does it. (3.2 only)
- Also rework SoftRasterizerRenderer::_UpdateFogTable() to use the same variable naming scheme as OpenGL. This is done for better code consistency.
- In reality, I'm already looking to scrapping this algorithm in OpenGL for something that could be better in every possible way, but I want to commit this SoftRasterizer-esque algorithm first so that we have a working version of it on record.
2021-09-08 12:54:35 -07:00
zeromus 8c4e42f98d fix bug that made desmume get a random MAC address on each boot without anybody knowing it or asking for it. this triggered time-travel protections in games. 2021-09-08 04:17:57 -04:00
rogerman f3c3228c70 Windows Port: Fix Windows build. (Regression from commit 037d328.) 2021-09-07 02:13:35 -07:00
rogerman 037d3285a9 Cocoa Port: Update project files to accommodate new GPU_Operation_* files. Also updates builds for AVX2. 2021-09-06 19:46:53 -07:00
rogerman 0db98725dc GPU: Do a massive refactor of the manually vectorized code and add full support for AVX2.
- Most notably, each version of the manually vectorized code now resides in their own files.
- Depending on the rendering situation, the new AVX2 code may increase rendering performance by 5% to up to 50%.
- Certain functions automatically gain manual vectorization support since the new GPU code makes use of the new general-purpose copy functions that were added in commit e991b16. In other words, AVX-512 and AltiVec builds also benefit from this.
2021-09-06 18:00:38 -07:00
rogerman 4226fa7ab2 SPU.cpp: More silencing of compiler warnings, code cleanup, and consistency improvements. 2021-09-06 15:10:05 -07:00
rogerman 207e93b8ae mc.cpp: Silence a whole bunch of compiler warnings and improve code consistency. 2021-09-06 14:28:11 -07:00
rogerman 620d3b3a26 Render3D: Fix clear image on big-endian systems.
- Also renames "Altivec" to "AltiVec" to remain consistent with Colorspace Handler's naming.
- Also adds an AltiVec accelerated version of the clear image parser.
2021-09-05 01:25:13 -07:00
rogerman c49a480d51 SoftRasterizer: Due to how the class inheritance works, SoftRasterizer_AVX actually requires AVX2 instead of just AVX. And in reality, AVX2 is just more practical than AVX for what we're doing here.
- Also do some minor refactoring of Render3D.
2021-09-04 19:31:55 -07:00
rogerman 92fcd1313e OpenGL Renderer: Do a minor optimization when running NDS-Style Depth Calculation.
- As a positive side-effect, generating the geometry shaders now runs quicker too.
2021-09-04 17:50:10 -07:00
rogerman ef35f72172 FIFO: Fix buffer copying for AltiVec. 2021-09-04 17:42:56 -07:00
rogerman 192e0f88b2 Cocoa Port: Perform post-build code signing for final stage of Release build. 2021-09-03 12:03:06 -07:00
rogerman 777329a993 Cocoa Port: Fix the OpenGL renderer on macOS v10.7 Lion. 2021-09-03 02:20:07 -07:00
rogerman 22801dac3c Cocoa Port: Delete now defunct Xcode 9 build scheme. 2021-09-03 01:07:57 -07:00
rogerman 2b3a7a7e50 Cocoa Port: Update Final Release builds to split 32-bit and 64-bit binaries between Xcode 9 and Xcode 12, respectively.
- Final Release builds still remain as PowerPC 32-bit, Intel 32-bit, and Intel 64-bit. ARM64 is not supported yet.
- PowerPC 32-bit and Intel 32-bit continue to require macOS v10.5 Leopard like before, but the Intel 64-bit binary now requires macOS v10.7 Lion or later. (Now, the Intel 64-bit binary will simply fail to run on Leopard and Snow Leopard.)
2021-09-02 22:53:45 -07:00
rogerman e775f17c87 OpenGL Renderer: Fix some issues where shaders wouldn't work on older/stricter video drivers.
- Specifically, we're now respecting uniform control flow for texture lookups, for which older/stricter drivers will silently fail because they consider texture lookups within conditional blocks to be undefined.
2021-09-02 22:44:12 -07:00
rogerman ea02efda78 Alright, fix the Windows build for real. 2021-09-01 02:54:20 -07:00
rogerman 379af45813 Did this fix it? 2021-09-01 01:18:00 -07:00
rogerman 7eabbb8ea6 Silence a whole lot of longstanding compiler warnings. 2021-09-01 00:49:50 -07:00
rogerman 0df858f2e8 Cocoa Port: Add the ability for the user to set a fixed frame skip value, just like in the Windows port. This is in addition to the existing automatic frame skip setting. 2021-08-31 13:56:07 -07:00
rogerman 67fa412144 gdbstub.cpp: Fix compiling for builds that use GDB stub. (Regression from commit cfe88ce.) 2021-08-31 11:06:22 -07:00
rogerman cfe88ce0d7 Core: Silence the 1000+ compiler warnings about using offsetof() on a non-POD type... again. 2021-08-31 10:23:04 -07:00
rogerman 3f47c4ad7d Cocoa Port: Fix building for Xcode 3. (Regression from commit 03b9481.) 2021-08-30 20:34:42 -07:00
rogerman 4a9c71b988 Cocoa Port: Also add command queue names for Metal display views. 2021-08-30 20:07:58 -07:00
rogerman 03b9481095 Cocoa Port: Add thread names for this port's own threads too. 2021-08-30 20:06:42 -07:00
rogerman 4f8ba2beb9 task.cpp: Support thread naming on macOS.
- Related to commit 11fe823 and commit e70e065.
2021-08-30 20:02:49 -07:00
rogerman 0d51b40479 Do some minor changes to support compilers running strict C++17 conventions. 2021-08-30 12:50:15 -07:00
rogerman 3b06be0d07 FIFO.cpp: For AVX-512 built targets only, correct _DISP_FIFOrecv_LineOpaque32_vec() to require Tier-1 support instead of Tier-0. 2021-08-30 12:44:30 -07:00
rogerman 479c404b60 Core: Fix compiling for AltiVec build targets. 2021-08-30 12:42:48 -07:00
rogerman 63702ff6bd task: Change to C++03 conventions to support older compilers. Related to commit 5428763. 2021-08-30 12:39:28 -07:00