chss95cs@gmail.com
eb8154908c
atomic cas use prefetchw if available
...
remove useless memorybarrier
remove double membarrier in wait pm4 cmd
add int64 cvar
use int64 cvar for x64 feature mask
Rework some functions that were frontend bound according to vtune placing some of their code in different noinline functions, profiling after indicating l1 cache misses decreased and perf of func increased
remove long vpinsrd dep chain code for conversion.h, instead do normal load+bswap or movbe if avail
Much faster entry table via split_map, code size could be improved though
GetResolveInfo was very large and had impact on icache, mark callees as noinline + msvc pragma optimize small
use log2 shifts instead of integer divides in memory
minor optimizations in PhysicalHeap::EnableAccessCallbacks, the majority of time in the function is spent looping, NOT calling Protect! Someone should optimize this function and rework the algo completely
remove wonky scheduling log message, it was spammy and unhelpful
lock count was unnecessary for criticalsection mutex, criticalsection is already a recursive mutex
brief notes i gotta run
2022-09-17 04:04:53 -07:00
chss95cs@gmail.com
08f7a28920
Alternative mutex
2022-08-14 08:59:11 -07:00
Gliniak
6c6c5ac14b
Merge remote-tracking branch 'GliniakRepo/experimentals' into canary_experimental
2022-05-19 10:51:44 +02:00
Philpax
e901567193
Fix crash from null sample channel
...
Certain games, such as Forza Motorsport 3, submit XMA data with the
stereo flag set with a null second channel. This falls back to mono
conversion when the second channel is null, preventing a crash.
2022-05-19 10:22:41 +02:00
Gliniak
de03165995
Merge remote-tracking branch 'GliniakRepo/audioSkipHeaderInputOffset' into canary_pr
2022-05-19 10:16:41 +02:00
Joel Linn
986dcf4f65
[Base] Check success of sync primitive creation
...
- Mainly use `assert`s, since failure is very rare
- Forward failure of `CreateSemaphore` to guests because it is more easy
to trigger with invalid initial parameters.
2022-03-08 12:17:57 -06:00
Gliniak
07a1e77218
Allow users to change max amount of queued frames
2022-01-31 20:12:39 +01:00
Gliniak
c483da91a4
Stop unnecessary spam of 0x601 opcode usage
2022-01-31 20:11:53 +01:00
Gliniak
8e35a3d649
Invalidate input buffers if decoding fails
...
Should output be invalidated too?
2022-01-31 20:11:44 +01:00
Gliniak
c80ea14d9d
Check if input_buffer exist
...
In some really specific cases there is a chance that
one of the buffers is valid, but its pointer is null
2022-01-31 20:10:14 +01:00
Pseudo-Kernel
372bdd3ec9
[APU] XMA: Fix audio loop handling.
...
Handles audio loop if loop_start < loop_end.
Need to handle additional cases like loop_start > loop_end.
2022-01-29 02:49:00 -06:00
Triang3l
0846cc026d
[APU] Manage XAudio 2.8 lifecycle in MTA thread + error handling cleanup
2021-12-12 17:05:01 +03:00
Gliniak
f40607041b
[APU] Skip audio header when there is no valid input
...
Thanks Cancerous1/Randprint for initial reseach in this topic
2021-10-18 08:50:51 +02:00
Triang3l
e720e0a540
[Code] Remove game names from code comments (most of at least)
2021-09-05 21:27:40 +03:00
Triang3l
6ce5330f5f
[UI] Loop thread to main thread WindowedAppContext
2021-08-28 19:38:24 +03:00
gibbed
8daef93207
[APU] XMA register table cleanup, documentation.
...
- [APU] Clean up XMA register table.
- [APU] Document observed register ranges in the XMA register table.
2021-06-28 20:32:52 -05:00
Joel Linn
f15e3d07e7
[APU] Use vectorized converter in xaudio2 backend
2021-06-12 18:57:39 +03:00
Joel Linn
0ad939b2f1
[APU] Add AVX intrinsic variants for conversion
2021-06-12 18:57:39 +03:00
Joel Linn
cd631fc447
[APU, SDL] Refactor sample submission
...
- Move sample conversion to SDL callback thread
- Add early channel down-conversion
2021-06-12 18:57:39 +03:00
Gliniak
313fb3e5a3
[XMA] GetFrameNumber: Return correct frame_idx at stream end
2021-06-05 08:54:22 -05:00
Triang3l
ca7036707b
[APU] XMA: Instruction name comment typo correction
2021-06-05 16:43:49 +03:00
Triang3l
add65318c2
[APU] XMA: ConvertFrame always returns true
2021-06-05 16:27:40 +03:00
Triang3l
60b24b2d3a
[APU] XMA: Vectorize 2-channel ConvertFrame
2021-06-05 16:10:41 +03:00
Triang3l
3c20a83972
[Base] Float clamping cleanup
2021-06-05 14:55:55 +03:00
Joel Linn
89a7c8f41f
[APU] Add vectorized audio frame conversion
2021-06-05 14:08:16 +03:00
Joel Linn
a86d7173e1
Refactor FourCC magic uses
...
- Use new fourcc_t type
- Improves compiler compatibility by removing multi chars
2021-06-02 22:28:43 -05:00
Gliniak
57ce647bb3
[APU/XMA] Prevent crash with invalid packet number
2021-05-07 16:59:17 -05:00
illusion0001
b5fc1efad5
XMA: Set log level for unhandled register to warning
2021-05-01 12:47:36 -05:00
Joel Linn
b6e5719173
[APU] Fix compilation on Linux
2021-05-01 12:41:02 -05:00
Joel Linn
534e263b05
[APU] XMA: Cross-buffer split frames.
2021-05-01 12:41:02 -05:00
Joel Linn
6547fa1748
[APU] Rewrite XMA packet parser
...
Use new FFmpeg frame decoder
2021-05-01 12:41:02 -05:00
Joel Linn
3675c8eac8
[APU] Disable warnings in FFmpeg.
2021-05-01 12:41:02 -05:00
Joel Linn
d4cf474665
Replace references to libav.
2021-05-01 12:41:02 -05:00
Gliniak
d1f7ee3593
[Audio/XMA] Invalidate output buffer when there is no valid input buffer
2020-11-15 11:31:11 -06:00
Sandy Carter
382dd8860f
[threading] Change thread names to suit pthread
...
Shorten names to 16.
Rename Win32 to Windowing.
Shorten GraphicsSystem thread names due to 16 length limit of pthread.
Without this change, both show up as GraphicsSystem.
Remove redundant "Worker" and "Thread" from names.
Remove redundant thread handle from thread name.
2020-11-15 11:12:05 -06:00
Joel Linn
6267c73c4c
[SDL] Add global helper to setup the library.
...
Call to SDLHelper::Prepare() is needed before first SDL_InitSubSystem().
- Sets hints (SDL configuration vars).
- Configures logging.
2020-04-23 15:44:58 -05:00
gibbed
134067d25e
[XMA] Add default case in av_log_callback.
2020-04-13 12:57:14 -05:00
gibbed
ce955e5aaa
[XMA] Reorganize ReadRegister/WriteRegister a bit in XmaDecoder.
2020-04-13 12:57:14 -05:00
Joel Linn
05a62673f7
[SDL2] Redirect log messages into our system.
2020-04-08 21:55:56 -05:00
Joel Linn
11d79c6c1c
[SDL2] Remove delayed loading code.
2020-04-08 21:55:56 -05:00
Joel Linn
804384c19c
[SDL2] On Win, build and link statically.
...
Keep using system lib dynamically on Unix.
2020-04-08 21:55:56 -05:00
gibbed
c51cba080b
Fix some bad string formats.
2020-04-08 13:05:37 -05:00
gibbed
a48bb71c2f
Overhaul logging.
2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445
C++17ification.
...
C++17ification!
- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Joel Linn
160f218210
[APU/Linux] Implement cross platform audio using SDL2 library.
2020-02-10 14:01:47 -06:00
Triang3l
1bb3cd45ca
[APU] Support XAudio 2.7
2019-11-02 22:27:38 +03:00
Triang3l
7e6bf8022f
[Memory] Refactor GetPhysicalAddress and use it for XMA, resolve #1448
2019-08-24 17:42:06 +03:00
Triang3l
b25c50164f
[APU] Physical address in XE_XMA_REG_CONTEXT_ARRAY_ADDRESS
2019-08-16 21:20:10 +03:00
Triang3l
e35c609224
Revert "[APU] Temp XMA context allocation region workaround"
...
This reverts commit 968c337d22
.
2019-08-16 21:11:55 +03:00
Triang3l
968c337d22
[APU] Temp XMA context allocation region workaround
2019-08-16 09:47:28 +03:00
gibbed
53b564c1a6
[APU] Only set the work event/wait on the worker thread when they actually exist.
2019-08-04 00:49:32 -05:00
gibbed
38a6d110e7
[APU] Only wait on the worker thread if it actually exists.
2019-08-04 00:27:49 -05:00
gibbed
b2f62b1982
Clean up cvars (rename, recategorize).
2019-08-03 23:46:03 -05:00
gibbed
f5cddbbf3f
[App] Simplify and improve factory template.
...
[App] Rework audio and input system creation.
2019-08-03 17:36:50 -05:00
Jonathan Goyvaerts
81fe22f1c8
Get rid of gflags alltogether
2019-08-03 02:34:19 +02:00
Jonathan Goyvaerts
c1af632562
Replace all gflag implementations with cvar implementations
2019-08-03 02:34:07 +02:00
gibbed
bc0ebcb26e
- Clean up log level names, no need for LOG_LEVEL_ prefix when it is an
...
enum class.
- Clarify usage of log level in comment.
2019-04-30 17:41:27 -05:00
gibbed
d0d18ff570
[APU] Proper register file for XMA.
2019-04-20 10:57:42 -05:00
Margen67
896ac4a682
Update documentation.
...
- Convert http to https, provide archive link when possible.
- Made CPU-JIT.png more readable on dark themes;
Added a white background so there isn't black text on a black
background.
2018-11-22 09:20:09 -06:00
Triang3l
76c14f7e58
[APU] Load XAudio2_8.dll dynamically
2018-10-23 23:34:41 +03:00
Dr. Chat
25206be1aa
[APU] Handle XAudio2 initialization failures
2018-05-08 17:39:33 -05:00
Dr. Chat
9a15896305
[XMA] Remove ReadRegister/WriteRegister debug output
2018-05-05 18:46:14 -05:00
Dr. Chat
bfc8ecbeaa
[XMA] Check for invalid packet number in ValidFrameOffset
2017-12-26 20:58:31 -06:00
DrChat
1b038125a1
Fix Travis and the build
2017-12-23 17:49:37 -06:00
Dr. Chat
4bc6980ad4
[APU] Fill in a few previously unknown fields in the HW context
2017-12-23 13:49:41 -06:00
DrChat
aaf281351d
Format all code with new clang-format
2017-12-14 20:44:43 -06:00
DrChat
e699be0118
Logging: Add a flag to specify the minimum log level
...
--log_level = (0=error, 1=warning, 2=info, 3=debug)
2017-03-24 16:28:41 -05:00
Dr. Chat
a093fdcef8
XMA: Add an idle "low-power" state for the decoder.
2017-01-28 20:58:23 -06:00
Dr. Chat
f81a99e83a
XMA: Use a threadsafe bitmap to acquire/release contexts
...
Support Pausing/Resuming
2016-07-28 21:11:12 -05:00
Ben Vanik
952d35911c
Folding build_tools back into the main repo for simplicity.
2015-12-30 16:53:14 -08:00
Ben Vanik
0482ffad5a
Allow XMA decoder to be suspended.
2015-12-30 16:53:13 -08:00
Dr. Chat
ee0a41aa2c
Fix AudioSystem Restore and cleanup some code
2015-12-29 13:09:43 -08:00
Dr. Chat
b94ab4acbc
AudioSystem Save/Restore
2015-12-29 13:09:42 -08:00
Dr. Chat
4eff2d8420
AudioSystem - switch to a free flag for free clients rather than a queue.
2015-12-29 13:09:41 -08:00
Ben Vanik
00240945fe
Cleanup for the latest clang-format version.
2015-12-03 19:52:02 -08:00
sephiroth99
f4dae2335c
premake: Small fixes to various premake files
...
In particular, add the "src" group to apu/xaudio2 project, which was
missing.
2015-11-28 01:53:26 -05:00
Ben Vanik
1956b8708e
Fixing include orders and whitelisting others.
...
Will be broken until clang SVN 253772 is available on travis/snapshots.
2015-11-21 11:34:46 -08:00
Ben Vanik
a556316ba2
Skip xma read when at the end of the stream.
2015-11-16 19:40:43 -08:00
Ben Vanik
8784de0162
Cleaning up unneeded file.
2015-11-08 15:08:27 -08:00
Ben Vanik
5834a42ef3
Dependency injection for apu/gpu/hid.
2015-11-08 15:02:24 -08:00
Ben Vanik
4af6c41740
Moving profiling.h to base - UI could be separated for cleanliness.
2015-11-07 12:31:07 -08:00
Dr. Chat
c150552b9c
Quick-kill processing the XMA context if there's no new data available.
2015-09-25 18:40:49 -05:00
Ben Vanik
3fc1d02a09
Suspend some host threads that make guest callbacks.
2015-09-21 21:24:26 -07:00
Ben Vanik
e5fbf840d2
Shuffling kernel/.
2015-09-06 18:07:52 -07:00
Ben Vanik
790ce8aee1
Switch back to std:: muteces. mutices. mutexen.
2015-09-06 13:34:08 -07:00
Ben Vanik
3c96b6fa0a
DANGER DANGER. Switching to global critical region.
...
This changes almost all locks held by guest threads to use a single global
critical region. This emulates the behavior on the PPC of disabling
interrupts (by calls like KeRaiseIrqlToDpcLevel or masking interrupts),
and prevents deadlocks from occuring when threads are suspended or
otherwise blocked.
This has performance implications and a pass is needed to ensure the
locking is as granular as possible. It could also break everything
because it's fundamentally unsound. We'll see.
2015-09-06 09:30:54 -07:00
Dr. Chat
8024e4fd20
XMA: We can only decode an entire frame and write it out at a time! Saving samples is bad.
2015-09-02 20:20:45 -05:00
Ben Vanik
1cf1568189
Adding a yield in the XMA decoder to give other threads some breathing room.
2015-08-29 22:12:31 -07:00
Ben Vanik
e7b46afa9d
Fixing build and removing old binary libav submodule.
2015-08-29 21:04:26 -07:00
Dr. Chat
f80e5fc98d
Linting
2015-08-29 22:21:25 -05:00
Dr. Chat
50535b07c3
Change validity checks to assert statements.
2015-08-29 22:14:20 -05:00
Dr. Chat
afa013f4bf
libav_verbose flag
2015-08-29 22:11:59 -05:00
Dr. Chat
e3d87b1715
Whoops (formatting)
2015-08-29 22:05:33 -05:00
Dr. Chat
3d684ac304
Fixup the premake files
2015-08-29 22:04:12 -05:00
Dr. Chat
6c83b35003
Partial frame support.
2015-08-29 21:42:06 -05:00
Dr. Chat
d8ed66c336
More improvements to the XMA decoder (and included some forgotten files)
2015-08-29 21:18:04 -05:00
Dr. Chat
0f9cd8cfb3
New WIP audio decoder
2015-08-29 21:16:57 -05:00
Dr. Chat
f2b2a22687
Add gflags to projects that need it only
2015-08-29 21:16:57 -05:00
Ben Vanik
b7203c2989
Logging to with a ringbuffer. Much faster.
2015-08-29 18:06:30 -07:00
Ben Vanik
19299fad4b
Removing apu/ deps on Emulator.
2015-08-18 10:54:56 -07:00