Commit Graph

107 Commits

Author SHA1 Message Date
pstef 6bfb7862e7 Make -ffast-math exclusive to sinc_resampler.c
-ffast-math was added in ff14092d8d with a comment that it "helps SINC
resampler to auto-vectorize". The flag is an alias for "-fno-math-errno
-funsafe-math-optimizations -ffp-contract=fast -fno-honor-infinities
-fno-honor-nans". The last two of those cause compiler complaints
because while the flag was meant for this file, it's shared across the
codebase that includes statements that operate on infinities and NaNs.

GCC 13.3 with -fopt-info-vec reports 18 vectorizations for `-O3
-ffast-math`, 17 for `-O3 -fno-math-errno -funsafe-math-optimizations
-ffp-contract=fast` and also 17 for plain `-O3`. So using the subset of
-ffast-math without the offending flags buys nothing and loses 1
vectorization.

Both GCC and Clang provide the "fast-math" pragma directive, which I add
to this one file that benefits from it, under the condition that it's
supported. -ffast-math is removed from most of the makefiles.
2025-05-02 17:26:19 +00:00
Jesse Talavera-Greenberg cbf49a0b77
XDelta patch support (Take 2) (#15915)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* Add some enums that were excluded by the cherry-pick

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Reintegrate xdelta support

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword

* Slight cleanups

* Remove a stray comma that was hindering C89 builds

* Add XDelta support to CHANGES.md

* Change how the xdelta patch's name is computed

- To be in line with other recent refactoring

* Fix an incorrect merge

- Whoops, this part was from before I figured out how to get the size of a patched file

* Explain the song-and-dance behind computing a patched file's size

* Define some XDelta3-related constants to 0 on 32-bit platforms

* Adjust some Xdelta-related macro definitions

- Exclude the encoder, since we're not making patches
- Move some #defines to after inclusion of <stdint.h>, to fix undefined behavior
- Remove _WIN32_WINNT overrides, since they were for code that we're not using

* Fix Xdelta support

* Wrap an encoder-only function in `#if XD3_ENCODER`
2023-11-23 20:19:07 -08:00
LibretroAdmin f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
Jesse Talavera-Greenberg aaad220836
Add Xdelta support for softpatching (#14706)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Remove trailing commas from the enums I modified

- C89 doesn't allow them

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Add some RARCH_DBG calls for xdelta patching

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword
2022-12-19 01:10:04 +01:00
twinaphex c659751976 (PSP) Take out HAVE_LANGEXTRA for PSP - RAM is not at a premium for this
console
2022-04-11 07:11:16 +02:00
Francisco Javier Trujillo Mata 86b47b4859
[PSP] Update Retroarch to latest PSPDev status (#13544)
* Added newlib changes

* Add action to launch PPSSPP simulator

* Remove legacy config for the stack and heap

* Add pthread

* Simplify kernel_functions and improve references to HAVE_KERNEL_PRX

* Add some flags

* Improve audio init/deinit

* Improve exit by clicking home

* Add CI for PSP1

* Update PSP.yml
2022-01-25 03:50:18 +01:00
David G. F 9b7270cb6a
Minor improvements in PSP and CTR Makefiles (mostly for devs) (#13317) 2021-12-04 02:01:00 +01:00
twinaphex 28cac5c5a4 Add HAVE_CORE_INFO_CACHE - disable this for Steam build 2021-10-14 15:57:28 +02:00
Francisco Javier Trujillo Mata ec627a9c00 Remove embedded PTE from RA and use the one provided by the toolchain 2021-06-07 12:48:13 +02:00
jdgleaver a501dfd680 Update 7-Zip dependency to latest stable version (fixes CHD support on static platforms) 2021-04-28 12:00:50 +01:00
Francisco Javier Trujillo Mata 3f91423a3a Remove legacy way of using logs for PS2 and PSP platform 2021-01-19 14:31:45 +01:00
twinaphex 47e22d69bf Add HAVE_VIDEO_FILTER 2020-07-02 06:28:14 +02:00
twinaphex 3ee788def2 Add HAVE_DSP_FILTER 2020-07-02 02:13:04 +02:00
twinaphex 87b9c2a367 Add HAVE_REWIND switch 2020-07-01 21:04:05 +02:00
twinaphex 7862166ed2 Add back HAVE_SCREENSHOTS define from SSNES days 2020-07-01 17:47:13 +02:00
twinaphex 223d76680a Add HAVE_CHEATS ifdef 2020-06-30 19:35:55 +02:00
twinaphex bf04ac93c8 Add HAVE_RWAV 2020-06-30 17:36:03 +02:00
twinaphex b77dd9cfe4 Add HAVE_PATCH ifdef; add patch switch support to qb 2020-06-30 15:54:31 +02:00
Francisco Javier Trujillo Mata f0e1ab37cc Add Audio Mixer support to PSP 2020-03-14 18:38:24 +01:00
twinaphex e0fdd8d39e Add back HAVE_CONFIGFILE ifdef - will strip out remaps and overrides
support as well
2020-02-02 21:27:38 +01:00
Francisco Javier Trujillo Mata c86de916cb Put new makefile options after the commons for PSP 2020-01-08 16:53:42 +01:00
Twinaphex c014fc20a1
Update Makefile.psp1 2020-01-08 16:42:10 +01:00
Francisco Javier Trujillo Mata af6208be29 Improve Makefile to make easier Debug in PSP 2020-01-07 20:07:24 +01:00
orbea 63a92a3f78 Update the zlib include directory paths. 2019-07-25 11:18:33 -07:00
orbea 84f4dcba2b Remove WANT_ZLIB. 2019-07-25 11:18:33 -07:00
twinaphex 22d762be67 We need to split up zlib headers in libretro-common to its own separate
dir
2019-05-27 03:40:14 +02:00
orbea bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
TheMrIron2 96023ea469
PSP: Slightly more aggressive optimisation
- O3 flag replacing O2 for higher level of optimisation. Potentially unstable, but works for Wii U RetroArch along with other PSP emulators. I don't see why not.
- fsingle-precision-constant to simplify some operations. Should be safe while being more performant due to using less memory traffic and may lessen load on the CPU because of the simplification.
2018-08-21 20:48:55 +00:00
twinaphex a74ef2214d Start removing SINC ifdefs for individual Makefiles 2017-12-31 21:34:31 +01:00
Francisco José García García 86388283a4
[PSP] Buildfix 2017-12-28 10:36:11 +01:00
Twinaphex f330c0ebc7
Merge pull request #5921 from frangarcj/rthreads_audio
Rthreads audio
2017-12-28 01:42:31 +01:00
Francisco José García García 4fe6f032ec [PSP] Fix build 2017-12-27 17:15:26 +01:00
Francisco José García García 73e81dba96 [PSP] Bake pthreads with griffin 2017-12-26 23:45:09 +01:00
twinaphex 08d9ee9600 (PSP) Add thread support 2017-12-26 09:45:45 +01:00
ggf906 66157307d8 (PSP) Add thread support 2017-12-16 18:02:46 +01:00
twinaphex 621d89c52e (PSP1) Change to -O2 2017-12-12 00:17:17 +01:00
ggf906 940f0c6b0b (PSP) Strip and user 64MB where available 2017-12-12 00:04:35 +01:00
twinaphex 79809df6b5 Add include dirs for PSP 2017-11-06 23:26:49 +01:00
twinaphex 69abe6dbb9 Move deps/zlib to deps/libz 2017-03-25 10:05:33 +01:00
twinaphex 9375efe24e Add HAVE_CC_RESAMPLER defines 2016-12-12 12:44:29 +01:00
twinaphex c2bb410d8d Take out HAVE_BUILTIN_AUTOCONFIG - always include it 2016-10-04 07:33:57 +02:00
twinaphex 63af59a198 Add HAVE_LANGEXTRA 2016-06-07 06:05:41 +02:00
twinaphex 0e3ff650c2 Remove WANT_RPNG 2016-05-17 13:41:40 +02:00
twinaphex 25ec6a8872 Add HAVE_JPEG to project files 2016-05-17 13:39:06 +02:00
twinaphex 9a5ce5fdb3 Make HAVE_LIBRETRO_MANAGEMENT define obsolete 2016-02-03 12:31:29 +01:00
twinaphex 919220751c (PSP) Move files around 2015-09-20 15:33:54 +02:00
twinaphex 4e5bf65e23 Create HAVE_RPNG define 2015-04-19 16:55:03 +02:00
twinaphex 4d13e9d4cb Turn WANT_MINIZ into WANT_ZLIB 2015-03-14 05:24:57 +01:00
twinaphex aece30f6bc Rename deps/rzlib to deps/zlib 2015-03-06 01:47:09 +01:00
twinaphex 603b6eaf86 Revert "(PSP1) Set up INCDIRS correctly"
This reverts commit 30e5b8500f.
2015-02-26 05:44:52 +01:00