Commit Graph

52 Commits

Author SHA1 Message Date
chss95cs@gmail.com
d372d8d5e3 nasty commit with a bunch of test code left in, will clean up and pr
Remove the logger_ != nullptr check from shouldlog, it will nearly always be true except on initialization and gets checked later anyway, this shrinks the size of the generated code for some
Select specialized vastcpy for current cpu, for now only have paths for MOVDIR64B and generic avx1
Add XE_UNLIKELY/LIKELY if, they map better to the c++ unlikely/likely attributes which we will need to use soon
Finished reimplementing STVL/STVR/LVL/LVR as their own opcodes. we now generate far less code for these instructions. this also means optimization passes can be written to simplify/remove/replace these instructions in some cases. Found that a good deal of the X86 we were emitting for these instructions was dead code or redundant.
the reduction in generated HIR/x86 should help a lot with compilation times and make function precompilation more feasible as a default

Don't static assert in default prefetch impl, in c++20 the assertion will be triggered even without an instantiation
Reorder some if/else to prod msvc into ordering the branches optimally. it somewhat worked...
Added some notes about which opcodes should be removed/refactored
Dispatch in WriteRegister via vector compares for the bounds. still not very optimal, we ought to be checking whether any register in a range may be special
A lot of work on trying to optimize writeregister, moved wraparound path into a noinline function based on profiling info
Hoist the IsUcodeAnalyzed check out of AnalyzeShader, instead check it before each call. Profiler recorded many hits in the stack frame setup of the function, but none in the actual body of it, so the check is often true but the stack frame setup is run unconditionally
Pre-check whether we're about to write a single register from a ring
Replace more jump tables from draw_util/texture_info with popcnt based sparse indexing/bit tables/shuffle lookups
Place the GPU register file on its own VAD/virtual allocation, it is no longer a member of graphics system
2022-09-04 22:42:51 -05:00
jgoyvaerts
5296d2e91e Fix xenia.log file not always being created in the executable folder. 2022-06-07 09:41:52 +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
Triang3l
d2ef8d3300 [Base] Android error reporting via SIGABRT/RuntimeException 2022-01-30 18:36:11 +03:00
Wunkolo
1a8068b151 [Base] Add user-literals for several memory sizes
Rather than using `n * 1024 * 1024`, this adds a convenient `_MiB`/`_KiB` user-literal to the new `literals.h` header to concisely describe units of memory in a much more readable way. Any other useful literals can be added to this header. These literals exist in the `xe::literals` namespace so they are opt-in, similar to `std::chrono` literals, and require a `using namespace xe::literals` statement to utilize it within the current scope.

I've done a pass through the codebase to replace trivial instances of `1024 * 1024 * ...` expressions being used but avoided anything that added additional casting complexity from `size_t` to `uint32_t` and such to keep this commit concise.
2022-01-02 11:51:31 -06:00
Conrad Kramer
2962a266b5 Fix xenia-core build on macOS 2021-10-25 00:48:53 +03:00
Triang3l
acbd22840d [Base] Android log sink + sink cleanup 2021-09-13 22:53:19 +03:00
Triang3l
6ce5330f5f [UI] Loop thread to main thread WindowedAppContext 2021-08-28 19:38:24 +03:00
gibbed
80cafd9358 [Base] Clean up simple message box utility. 2021-06-28 11:57:06 -05:00
ztjohnst
a77ed6f4a7 [Base] Add ShowInfoMB / ShowErrorMB functions.
[Base] Add ShowInfoMessageBox / ShowErrorMessageBox functions.
2021-06-28 10:31:18 -05:00
gibbed
5c516cc341 Add missing break in logging. 2021-06-26 12:44:21 -05:00
gibbed
6bd96a5091 Remove unconditional block in logging.
Remove unconditional block in logging. This was done so the previous
commit shows an actual useful diff.
2021-06-26 12:26:10 -05:00
gibbed
458dbba4ae Ensure that logging waits before shutting down.
- Ensure that logging waits until everything is written before shutting
  down.
- Fix a bug where a new log line would not be written until the next
  log line had been appended.
2021-06-26 12:26:10 -05:00
Satori
52230fd4e8 [Base] Fix FileLogSink not writing to log file 2020-11-16 14:04:17 -06:00
Satori
b74eac36c7 [Base] Log to stdout by default 2020-11-16 01:52:27 -06:00
Satori
446837edb1 [Base/Win] Add cvars to enable a console window to be shown with xenia 2020-11-16 01:52:27 -06:00
Satori
42b10209fe [Base] Add support for multiple log sinks in Logger 2020-11-16 01:52:27 -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
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
gibbed
40cc8c52d7 [Base] Qualify std namespace. 2019-08-04 04:39:22 -05:00
gibbed
8b1f728d85 [Base] Use vwsprintf instead of _vsnwprintf. 2019-08-04 03:44:08 -05:00
gibbed
b685211b96 [Base] Add wide versions of FatalError. 2019-08-04 03:26:18 -05:00
gibbed
b2f62b1982 Clean up cvars (rename, recategorize). 2019-08-03 23:46:03 -05:00
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
Rick Gibbed
e51686bbac Merge pull request #1369 from jgoyvaerts/logger_fix
[Base] Flush the logger before exiting on a fatal error.
2019-05-11 11:45:00 -05:00
Jonathan Goyvaerts
eb5baa41bb Shutdown logging when a fatal error occurs, this fixes the error not showing up in the log file 2019-05-11 14:58:34 +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
fb50f02a98 [Base] Properly flush remaining writes out before shutting down logging. 2018-11-24 08:54:46 -06:00
DrChat
6b8a34c9ba [Base] Fix Travis 2018-03-03 19:15:37 -06:00
DrChat
4fd03e8029 [Base] Shutdown the logger to prevent truncation of output 2018-03-03 19:00:04 -06:00
DrChat
293878cd14 Use the app name as a default logfile. 2017-12-16 11:06:46 -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
2bd19478a4 Logger: Properly handle cases where strlen(formatted string) > capacity of log_format_buffer_ (as well as error cases) 2017-02-25 20:03:25 -06:00
DrChat
6d4b06c08f Use stdout as logfile for tests 2017-02-11 00:15:52 -06:00
DrChat
d43e2c7ff8 xenia-cpu-ppc-tests is now building on linux 2017-02-10 23:54:10 -06:00
Dr. Chat
7fb31462e4 Logger: Use platform-agnostic aligned alloc 2017-02-05 20:39:46 -06:00
Dr. Chat
65ca7fc416 Lockless logging 2017-02-04 19:26:39 -06:00
Ben Vanik
e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00
Ben Vanik
0133bec11d Fix empty line logging. 2015-09-06 13:34:19 -07:00
Ben Vanik
e48c3534cc Removing copy to temp buffer in log flush. 2015-09-06 10:28:17 -07:00
Ben Vanik
1d7f345960 Fix logging with null varargs. 2015-08-29 22:22:07 -07:00
Ben Vanik
a86b3821f2 Adding thread handle to logging. 2015-08-29 20:49:26 -07:00
Ben Vanik
b7203c2989 Logging to with a ringbuffer. Much faster. 2015-08-29 18:06:30 -07:00
Ben Vanik
a92566dfc5 More style. 2015-08-07 21:29:03 -07:00
Ben Vanik
e6461f326c Some xb style cleanup. 2015-08-05 22:06:20 -07:00
Ben Vanik
72ad899e9e Starting to remove windows.h includes from things. 2015-07-13 20:49:29 -07:00
Ben Vanik
ba88955be4 vsnprintf return is dumb. 2015-06-07 16:13:05 -07:00
Ben Vanik
bc9652e671 Actually fixing the off by one in log buffer size. 2015-06-04 20:04:39 -07:00
Ben Vanik
d3ddf0e718 Make the log buffer stupid large. 2015-06-04 19:58:26 -07:00