rogerman
335c7ad7e2
GPU: ClearWithColor() running in 15-bit color mode now always clears both native and custom buffers.
...
- This is being done for compatibility with less sophisticated clients that don't handle the NDSDisplayInfo.isCustomSizeRequested flag.
2025-09-21 21:07:41 -07:00
rogerman
5610909e5c
Render3D: Improve robustness of Render3DColorOut buffer binding.
2025-09-21 19:42:06 -07:00
thesource
c5bd273a9a
Port commit 58bbe69
to GTK3 frontend
2025-09-22 00:26:42 +02:00
rogerman
288a1e8347
Cocoa Port: Finish refactoring the audio output code. (Related to commit 3b07d28.)
2025-09-13 22:07:34 -07:00
rogerman
a08de1b00a
Cocoa Port: More refactoring.
...
- Add "ClientCheatManager.cpp" and "ClientFirmwareControl.cpp" files, moving all this C++ code to their own files.
- Remove the "cocoa_videofilter.mm/.h" files, which were never used and aren't planned to ever be used in the future.
2025-09-11 23:28:46 -07:00
rogerman
3b07d284cb
Cocoa Port: Major refactor to replace the Obj-C class CocoaDSOutput with the C++ class ClientEmulationOutput.
...
- Also replace more color-related data types from the generic uint32_t type to the more specific Color4u8 type.
2025-09-11 14:08:00 -07:00
rogerman
1638bc00ae
saves.cpp: Improve the code consistency of other functions that have a similar file name usage pattern. (Related to commit 6754adf.)
2025-09-03 09:48:37 -07:00
rogerman
6754adff86
saves.cpp: Add a bit more clarity to what scan_savestates() is actually doing, which is to concatenate a file extension to a base file name, and then use the resultant file name for a check.
2025-09-02 14:17:21 -07:00
rogerman
9f009f4856
Cocoa Port: Rename the class "OGLVideoOutput" to "OGLDisplayPresenter". Also remove some unused, and now obsolete, class methods.
2025-08-29 11:33:05 -07:00
rogerman
0fb3d46798
Cocoa Port: Fix potential issues for OpenGL display views running their fetched video processing on ancient GPUs that really really want to clear the framebuffer for stability. (Regression from commit 1670e3a.)
2025-08-28 13:39:47 -07:00
rogerman
1670e3a750
Cocoa Port: OpenGL display views can now perform color conversions and apply the NDS Master Brightness on the GPU during video fetch, just like how Metal display views do it.
...
- Systems with fast non-Metal capable GPUs (such as the MacBook Pro 17" Late-2011 or the iMac 27" Mid-2011) will see the most benefit, especially when running 18-bit video at high GPU scaling factors.
- For older systems with slower GPUs, running the new GPU-based video postprocessing may result in an overall performance loss. In order to run the video postprocessing on the CPU like before, you can use the menu option "View > Run Filters on GPU" to control whether video postprocessing happens on the GPU or on the CPU.
2025-08-28 01:30:16 -07:00
rogerman
a779eb7a59
gfx3d.h: Fix some comments. It's "byte", not "bit"!
2025-08-18 22:04:39 -07:00
rogerman
107e15d20b
Linux Ports (All): Make EGL initialization more robust.
2025-08-17 21:21:13 -07:00
linkmauve
df06de4cca
Remove OSMesa support ( #905 )
...
Mesa has now removed OSMesa from its codebase, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836
There is no reason to keep this any longer, especially since EGL can do
the same and more.
2025-08-17 20:46:34 -07:00
rogerman
b568e4359c
Render3D: Huge refactor that adds the new Render3DColorOut class, which now handles the framebuffers that integrate the 3D layer and the BG0 layer.
...
- Framebuffers are now double-buffered, which may help improve performance on games running at less than 60 FPS on host systems with weak GPUs.
- For OpenGL, slightly improve framebuffer download performance on macOS.
2025-08-13 23:58:21 -07:00
rogerman
8238c353fc
Render3D: Do some last minor refactoring tweaks. (Related to commit 2a52196.)
2025-08-09 22:16:46 -07:00
rogerman
2a5219649a
Render3D: Do a bunch of refactor in preparation of a more substantial refactor that will follow.
2025-08-09 19:21:55 -07:00
rogerman
82761798cc
Fix compiling on newer GCCs that are averse to referencing variables on an unexpected memory alignment.
2025-08-09 17:51:53 -07:00
rogerman
81683cb097
Fix memory alignment issues with bitfield structs when compiled on MSVC.
2025-08-09 16:00:34 -07:00
En-En
75958772ef
posix: in __glx_initOpenGL, add null check after XOpenDisplay ( #920 )
...
* posix: in `__glx_initOpenGL`, add null check after `XOpenDisplay`
Would segfault when built with GLX enabled and ran in Wayland. Now the same scenario instead falls back to the SoftRasterizer. Still not ideal, but using SDL as a fallback requires considerably more code redesign.
* posix: refine GLX with no X server error message
2025-08-08 13:54:19 -07:00
rogerman
a7812dcea5
Cocoa Port: Don't set thread priorities on single-core systems, hopefully preventing thread starvation and helping single-core systems run more stable.
2025-08-07 21:20:17 -07:00
rogerman
4ca5101f52
Cocoa Port: Fix a performance bug where OpenGL display views weren't fully DMA'ing the video frames directly from app to GPU as intended.
...
- This bug fix may improve video performance with certain configurations by up to 10%. (OpenGL display views only.)
2025-08-04 09:57:49 -07:00
rogerman
6715015cb6
Cocoa Port: Try to fix some potential issues with UI updates happening off the main thread.
2025-07-31 21:12:50 -07:00
rogerman
5cc55d60bd
Cocoa Port: Correct the usage of the GL_UNPACK_CLIENT_STORAGE_APPLE switch in OpenGL display views.
2025-07-31 21:09:42 -07:00
rogerman
cf5153d02d
Cocoa Port: Fix building with "DeSmuME (Latest).xcodeproj" on older Xcode. (Regression from commit 445060a.)
2025-07-27 15:45:04 -07:00
rogerman
e52e3963d0
GPU: Add AltiVec-accelerated functions for 2D layer compositing. (For PowerPC CPUs only.)
...
- This improves GPU performance by up to 25% on a PowerPC 970MP.
2025-07-25 17:37:55 -07:00
rogerman
2c4ff5fea6
GPU: CopyLineExpand() and CopyLineReduce() now respect the NEEDENDIANSWAP flag for 32-bit elements.
2025-07-25 13:24:45 -07:00
rogerman
ff7ad435d6
Texture Handler: Fix incorrect alpha masking on 16-bit direct textures for AltiVec.
2025-07-24 17:41:21 -07:00
rogerman
40c035f986
GPU: Fix remaining issues with display capture giving incorrect colors on big-endian systems.
...
- This commit effectively reverts commit 6bcf70d
, since this commit fixes the problem in the correct location this time.
2025-07-22 17:59:49 -07:00
rogerman
f28dbbb5b3
GPU: Fix building for ARM NEON. (Regression from commit b6467fb.)
2025-07-22 15:44:28 -07:00
rogerman
b6467fbd13
GPU: Begin transitioning 16-bit colors from the plain old u16 data type to the new Color5551 data type.
2025-07-22 15:00:20 -07:00
rogerman
12b4802a03
Refactor the union "COLOR" from GPU.h into types.h and rename it to "Color5551". This allows the union to be used in more places where appropriate.
2025-07-22 09:53:47 -07:00
rogerman
08394d33f9
GPU: Fix various graphical glitches on big-endian systems.
...
- Fix a bug where max bright down would display a red screen instead of a black screen when running in 18-bit or 24-bit color mode.
- Fix incorrect colors for various display capture scenarios.
- 15-bit to 18-bit and 15-bit to 24-bit color conversions now assume byte swapping. This improves 2D graphics performance by up to 5%.
2025-07-19 22:29:29 -07:00
rogerman
6bcf70dc6d
Colorspace Handler: Fix RGBA8888 to RGBA5551 color conversions in AltiVec.
2025-07-19 18:53:07 -07:00
rogerman
f03f8943a0
Cocoa Port: Fix HUD input coordinate colors on big-endian systems. (Regression from commit deef974.)
2025-07-19 18:28:30 -07:00
rogerman
39973c52bc
matrix.h: AltiVec accelerated functions buffer_copy_or_constant_*() and buffer_copy_or_constant_*_fast() now respect the NEEDENDIANSWAP switch.
...
- Also do some code cleanup where appropriate.
2025-07-19 11:38:06 -07:00
rogerman
e75b67043b
Partially revert commit 0367d14
. Looks like the algorithm for converting RGBA6665 to RGBA5551 colors in AltiVec doesn't need to be THAT accurate, so resimplify the algorithm again to pick up the speed.
2025-07-18 16:21:29 -07:00
rogerman
0367d1469d
Colorspace Handler: Improve the accuracy of RGBA6665 to RGBA5551 color conversions in AltiVec.
...
- Also do some code cleanup where appropriate.
2025-07-15 16:40:27 -07:00
rogerman
66b525b8dc
Video Filters: Separate all xBRZ custom texture upscaling code from the standard xBRZ code.
2025-07-15 14:06:00 -07:00
rogerman
deef974c85
Cocoa Port: Fix a bug where HUD colors would fail to work when running on macOS Leopard or Snow Leopard.
...
- Also fix a bug on big-endian systems where HUD colors were being stored in the user defaults file in big-endian byte order instead of little-endian byte order.
2025-07-14 14:47:12 -07:00
rogerman
63114d0aa2
Fix texture upscaling on big-endian systems.
2025-07-12 20:25:09 -07:00
rogerman
b962b925f5
Cocoa Port: Update CheatDatabaseViewer.xib to a file format that is compatible with Xcode 16.
2025-07-11 02:01:49 -07:00
rogerman
445060a0cc
Cocoa Port: Update Xcode project files to reflect better build procedures.
...
- The main Xcode project disables Metal API Validation for Debug builds, since this seems to cause runtime issues on Xcode 16.
- The Xcode 3 project removes the git lookup build script for the PowerPC LLVM-Clang build, since the typical use case for this particular build won't have git commands available.
2025-07-11 01:43:54 -07:00
rogerman
557176faa3
Cocoa Port: Silence a compiler warning when building on older Xcode.
2025-07-11 00:45:08 -07:00
rogerman
266301a13a
GPU: Vectorized mosaic rendering now uses an aligned working buffer, improving performance for SSE2 and AVX2.
2025-07-04 15:15:32 -07:00
rogerman
e6500f2010
Silence even more compiler warnings. (Related to commits 2b40a2f
and 22a833b.)
2025-07-04 15:00:20 -07:00
rogerman
b23b8e7e6c
Cocoa Port: Fix a bug where running OpenGL display views on modern macOS would fail. (Regression from commit a98c319.)
2025-07-04 14:46:30 -07:00
rogerman
22a833b52e
Silence some more compiler warnings. (Related to commit 2b40a2f.)
2025-06-27 11:20:32 -07:00
rogerman
d3ee4eaabb
OpenGL Renderer: Fix rendering when a non-standard viewport is used. (Regression from commit 3db6d56
. Fixes #902.)
2025-06-25 16:03:43 -07:00
rogerman
2b40a2f12c
Take another pass at silencing a bunch of compiler warnings where appropriate.
...
Most warnings are related to the following:
- Integer precision loss from implicit conversion
- Non-virtual destructors for classes with virtual methods
- Replace the unsafe sprintf() function with the safer snprintf()
- Local variables shadowing
- Extraneous commas and semicolons
Not all of these warnings have been fixed yet,, since fixing the remaining warnings requires a deeper review of the code for a proper fix.
2025-06-24 19:33:17 -07:00