Commit Graph

12118 Commits (8af6e6a05207b1c9736bd80a89ec3aed1f96dfea)
 

Author SHA1 Message Date
Lioncash e3b2539986 common/file_util: Remove unnecessary c_str() calls
The file stream open functions have supported std::string overloads
since C++11, so we don't need to use c_str() here. Same behavior, less
code.
6 years ago
Lioncash 8cd3d9be26 common/file_util: Make IOFile's WriteString take a std::string_view
We don't need to force the usage of a std::string here, and can instead
use a std::string_view, which allows writing out other forms of strings
(e.g. C-style strings) without any unnecessary heap allocations.
6 years ago
Michael Scire 016f2eab73 Fix bitmask logic inversion 6 years ago
Michael Scire 2ed896075e fix introduced clang-format errors 6 years ago
Michael Scire d81b58f320 Address review comments 6 years ago
Michael Scire 7fba9c7224 clang-format fixes 6 years ago
Michael Scire 7dbf4c1ae5 Implement IApplicationFunctions::GetDesiredLanguage 6 years ago
Lioncash b6dcb1ae4d shader/shader_ir: Make Comment() take a std::string by value
This allows for forming comment nodes without making unnecessary copies
of the std::string instance.

e.g. previously:

Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]",
        cbuf->GetIndex(), cbuf_offset));

Would result in a copy of the string being created, as CommentNode()
takes a std::string by value (a const ref passed to a value parameter
results in a copy).

Now, only one instance of the string is ever moved around. (fmt::format
returns a std::string, and since it's returned from a function by value,
this is a prvalue (which can be treated like an rvalue), so it's moved
into Comment's string parameter), we then move it into the CommentNode
constructor, which then moves the string into its member variable).
6 years ago
Lioncash 228e58d0a5 shader/decode/*: Add missing newline to files lacking them
Keeps the shader code file endings consistent.
6 years ago
Lioncash 87b4c1ac5e shader/decode/*: Eliminate indirect inclusions
Amends cases where we were using things that were indirectly being
satisfied through other headers. This way, if those headers change and
eliminate dependencies on other headers in the future, we don't have
cascading compilation errors.
6 years ago
Lioncash 3e7d37301a service/aoc: Avoid allocating and discarding data
Previously, the code was accumulating data into a std::vector and then
tossing all of it away if a setting was disabled.

Instead, we can just check if it's disabled and do no work at all if
possible. If it's enabled, then we can append to the vector and
allocate.

Unlikely to impact usage much, but it is slightly less sloppy with
resources.
6 years ago
Lioncash d0e200a894 service/aoc: Remove unnecessary includes
Removes two header dependencies related to file handling that aren't
actually used within the source file.
6 years ago
Lioncash 819d229e76 service/aoc: Pop all passed values where applicable
A few of the aoc service stubs/implementations weren't fully popping all
of the parameters passed to them. This ensures that all parameters are
popped and, at minimum, logged out.
6 years ago
Lioncash 195b54602f shader/decode/memory: Remove left in debug pragma 6 years ago
ReinUsesLisp f4c15db9e8 externals: Update glad to support OpenGL 4.6 compatibility profile
Now that we have an OpenGL compatibility profile we might want to use
OpenGL compatibility symbols that are not available in our current glad.

This commit has been generated with https://glad.dav1d.de/ with all
extensions enabled and OpenGL 4.6 compatibility profile.
6 years ago
Lioncash de23847184 renderer_opengl/gl_shader_decompiler: Remove redundant name specification in format string
This accidentally slipped through a rebase.
6 years ago
ReinUsesLisp 69215b5a55 gl_shader_cache: Fix clang strict standard build issues 6 years ago
ReinUsesLisp c03b8c4c19 gl_shader_cache: Use shared contexts to build shaders in parallel 6 years ago
ReinUsesLisp 75e7b45d69 shader/memory: Implement ST (generic memory) 6 years ago
ReinUsesLisp f78ef617b6 shader/memory: Implement LD (generic memory) 6 years ago
Lioncash f49a04ba39 yuzu/configuration/config: Make default hotkeys an internally-linked array in the cpp file
Given the array is a private static array, we can just make it
internally linked to hide it from external code. This also allows us to
remove an inclusion within the header.
6 years ago
Lioncash 938d6dca30 yuzu/configuration/config: Specify string conversions explicitly
Allows the configuration code to build successfully with implicit string
conversions disabled.
6 years ago
bunnei 9ffc60b5b3
Merge pull request #2455 from lioncash/config
configuration/config: Move config loading and saving to functions based off groups
6 years ago
bunnei dbcff5d574
Merge pull request #2503 from lioncash/util
yuzu/game_list: Specify string conversions explicitly
6 years ago
bunnei 9a17b20896
Merge pull request #2494 from lioncash/shader-text
gl_shader_decompiler: Add AddLine() overloads with single function that forwards to libfmt
6 years ago
ReinUsesLisp 9c3461604c shader: Implement S2R Tid{XYZ} and CtaId{XYZ} 6 years ago
ReinUsesLisp ada79fa8ad gl_shader_decompiler: Make GetSwizzle constexpr 6 years ago
Lioncash bc32474901 yuzu/game_list: Specify string conversions explicitly
Allows the game list code to compile successfully with implicit string
conversions disabled.
6 years ago
Lioncash ed2fedac13 yuzu/game_list_worker: Specify string conversions explicitly
Allows the game list worker code to compile successfully with implicit
string conversions disabled.
6 years ago
Lioncash 7a82d6f394 yuzu/game_list_p: Amend mentions of SMDH in comments
SMDH is a metadata format used in some executable formats for the
Nintendo 3DS. Switch executables don't utilize this metadata format, so
this just a holdover from Citra and can be corrected.
6 years ago
Lioncash 486c3e6085 yuzu/game_list_p: Specify string conversions explicitly
Allows the game list item code to build with implicit string conversions
disabled.
6 years ago
Lioncash 922d8c6cb4 yuzu/loading_screen: Specify string conversions explicitly
Allows the loading screen code to compile with implicit string
conversions disabled.

While we're at it remove unnecessary const usages, and add it to nearby
variables where appropriate.
6 years ago
Lioncash fd34732e26 yuzu/bootmanager: Specify string conversions explicitly
Allows the bootmanager code to compile with implicit string conversions
disabled.
6 years ago
Lioncash 317f1263fb yuzu/util: Specify string conversions explicitly
Allows the util code to build with implicit string conversions disabled.
6 years ago
Lioncash 58a0c13e34 gl_shader_decompiler: Tidy up minor remaining cases of unnecessary std::string concatenation 6 years ago
Lioncash 6fb29764d6 gl_shader_decompiler: Replace individual overloads with the fmt-based one
Gets rid of the need to special-case brace handling depending on the
overload used, and makes it consistent across the board with how fmt
handles them.

Strings with compile-time deducible strings are directly forwarded to
std::string's constructor, so we don't need to worry about the
performance difference here, as it'll be identical.
6 years ago
Lioncash 784d2b6c3d gl_shader_decompiler: Utilize fmt overload of AddLine() where applicable 6 years ago
bunnei 0adb54abc1
Merge pull request #2499 from lioncash/translate
yuzu/configuration: Specify string conversions explicitly
6 years ago
Hexagon12 73ee85e9ae
Merge pull request #2500 from FernandoS27/revert-2466
Revert #2466
6 years ago
Fernando Sahmkow 911fafb967 Revert #2466
This reverts a tested behavior on delay slots not exiting if the exit 
flag is set. Currently new tests are required in order to ensure this 
behavior.
6 years ago
Lioncash 91ec251c4a gl_shader_decompiler: Add AddLine() overload that forwards to fmt
In a lot of places throughout the decompiler, string concatenation via
operator+ is used quite heavily. This is usually fine, when not heavily
used, but when used extensively, can be a problem. operator+ creates an
entirely new heap allocated temporary string and given we perform
expressions like:

std::string thing = a + b + c + d;

this ends up with a lot of unnecessary temporary strings being created
and discarded, which kind of thrashes the heap more than we need to.
Given we utilize fmt in some AddLine calls, we can make this a part of
the ShaderWriter's API. We can make an overload that simply acts as a
passthrough to fmt.

This way, whenever things need to be appended to a string, the operation
can be done via a single string formatting operation instead of
discarding numerous temporary strings. This also has the benefit of
making the strings themselves look nicer and makes it easier to spot
errors in them.
6 years ago
bunnei d49efbfb4a
Merge pull request #2441 from ReinUsesLisp/al2p
shader: Implement AL2P and ALD.PHYS
6 years ago
bunnei 13dda1d8ed
Merge pull request #2410 from lioncash/affinity
kernel/svc: Reorganize and fix up the initial handling of svcSetThreadCoreMask()
6 years ago
Lioncash 2318c394a8 yuzu/configuration/configure_web: Specify string conversions explicitly
Allows the web config code to compile with implicit string conversions
disabled. We can also deduplicate the calls to create the pixmap.
6 years ago
Lioncash d9c4d64ed5 yuzu/configuration/configure_system: Specify string conversions explicitly
Allows the system config code to build successfully with implicit string
conversions disabled.
6 years ago
Lioncash 428d8098a7 yuzu/configuration/configure_profile_manager: Mark UI string as translatable
This is a user-facing string, so it should be marked as translatable.
6 years ago
Lioncash 17255cd835 yuzu/configuration/configure_per_general: Specify string conversions explicitly
Allows the per-game configuration to be successfully built with implicit
string conversions disabled.
6 years ago
Lioncash 3039211c20 yuzu/configuration/configure_mouse_advanced: Clean up array accesses
Deduplicates array accesses and uses a named variable where appropriate.
6 years ago
Lioncash c9c4208c4a yuzu/configuration/configure_mouse_advanced: Specify string conversions explicitly
Allows the advanced mouse configuration code to build with implicit
string conversions disabled.
6 years ago
Lioncash aa83639b78 yuzu/configuration/configure_input_player: Clean up array accesses
Rather than repeatedly index arrays that have quite a large array index,
we can just use a named variable instead.
6 years ago