aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-05-24yuzu/main: Specify string conversions where applicableLioncash
2019-05-24Merge pull request #2485 from ReinUsesLisp/generic-memorybunnei
shader/memory: Implement generic memory stores and loads (ST and LD)
2019-05-24Merge pull request #2504 from lioncash/configbunnei
yuzu/configuration/config: Specify string conversions explicitly
2019-05-24Merge pull request #2489 from FearlessTobi/port-4716bunnei
Port citra-emu/citra#4716: "HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread"
2019-05-24gl_shader_decompiler: Use an if based cbuf indexing for broken driversReinUsesLisp
The following code is broken on AMD's proprietary GLSL compiler: ```glsl uint idx = ...; vec4 values = ...; float some_value = values[idx & 3]; ``` It index the wrong components, to fix this the following pessimized code is emitted when that bug is present: ```glsl uint idx = ...; vec4 values = ...; float some_value; if ((idx & 3) == 0) some_value = values.x; if ((idx & 3) == 1) some_value = values.y; if ((idx & 3) == 2) some_value = values.z; if ((idx & 3) == 3) some_value = values.w; ```
2019-05-24gl_device: Add test to detect broken component indexingReinUsesLisp
Component indexing on AMD's proprietary driver is broken. This commit adds a test to detect when we are on a driver that can't successfully manage component indexing. It dispatches a dummy draw with just one vertex shader that writes to an indexed SSBO from the GPU with data sent through uniforms, it then reads that data from the CPU and compares the expected output.
2019-05-23common/file_util: Remove unnecessary return at end of void StripTailDirSlashes()Lioncash
While we're at it, also invert the conditional into a guard clause.
2019-05-23common/file_util: Make GetCurrentDir() return a std::optionalLioncash
nullptr was being returned in the error case, which, at a glance may seem perfectly OK... until you realize that std::string has the invariant that it may not be constructed from a null pointer. This means that if this error case was ever hit, then the application would most likely crash from a thrown exception in std::string's constructor. Instead, we can change the function to return an optional value, indicating if a failure occurred.
2019-05-23common/file_util: Remove duplicated documentation commentsLioncash
These are already present within the header, so they don't need to be repeated in the cpp file.
2019-05-23common/file_util: Make ReadFileToString and WriteStringToFile consistentLioncash
Makes the parameter ordering consistent, and also makes the filename parameter a std::string. A std::string would be constructed anyways with the previous code, as IOFile's only constructor with a filepath is one taking a std::string. We can also make WriteStringToFile's string parameter utilize a std::string_view for the string, making use of our previous changes to IOFile.
2019-05-23common/file_util: Remove unnecessary c_str() callsLioncash
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.
2019-05-23common/file_util: Make IOFile's WriteString take a std::string_viewLioncash
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.
2019-05-23Fix bitmask logic inversionMichael Scire
2019-05-23fix introduced clang-format errorsMichael Scire
2019-05-23Address review commentsMichael Scire
2019-05-23clang-format fixesMichael Scire
2019-05-23Implement IApplicationFunctions::GetDesiredLanguageMichael Scire
2019-05-23shader/shader_ir: Make Comment() take a std::string by valueLioncash
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).
2019-05-23shader/decode/*: Add missing newline to files lacking themLioncash
Keeps the shader code file endings consistent.
2019-05-23shader/decode/*: Eliminate indirect inclusionsLioncash
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.
2019-05-23service/aoc: Avoid allocating and discarding dataLioncash
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.
2019-05-22service/aoc: Remove unnecessary includesLioncash
Removes two header dependencies related to file handling that aren't actually used within the source file.
2019-05-22service/aoc: Pop all passed values where applicableLioncash
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.
2019-05-22shader/decode/memory: Remove left in debug pragmaLioncash
2019-05-21renderer_opengl/gl_shader_decompiler: Remove redundant name specification in ↵Lioncash
format string This accidentally slipped through a rebase.
2019-05-20gl_shader_cache: Fix clang strict standard build issuesReinUsesLisp
2019-05-20gl_shader_cache: Use shared contexts to build shaders in parallelReinUsesLisp
2019-05-20shader/memory: Implement ST (generic memory)ReinUsesLisp
2019-05-20shader/memory: Implement LD (generic memory)ReinUsesLisp
2019-05-20yuzu/configuration/config: Make default hotkeys an internally-linked array ↵Lioncash
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.
2019-05-20yuzu/configuration/config: Specify string conversions explicitlyLioncash
Allows the configuration code to build successfully with implicit string conversions disabled.
2019-05-20Merge pull request #2455 from lioncash/configbunnei
configuration/config: Move config loading and saving to functions based off groups
2019-05-20Merge pull request #2503 from lioncash/utilbunnei
yuzu/game_list: Specify string conversions explicitly
2019-05-20Merge pull request #2494 from lioncash/shader-textbunnei
gl_shader_decompiler: Add AddLine() overloads with single function that forwards to libfmt
2019-05-20shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp
2019-05-20gl_shader_decompiler: Make GetSwizzle constexprReinUsesLisp
2019-05-20yuzu/game_list: Specify string conversions explicitlyLioncash
Allows the game list code to compile successfully with implicit string conversions disabled.
2019-05-20yuzu/game_list_worker: Specify string conversions explicitlyLioncash
Allows the game list worker code to compile successfully with implicit string conversions disabled.
2019-05-20yuzu/game_list_p: Amend mentions of SMDH in commentsLioncash
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.
2019-05-20yuzu/game_list_p: Specify string conversions explicitlyLioncash
Allows the game list item code to build with implicit string conversions disabled.
2019-05-20yuzu/loading_screen: Specify string conversions explicitlyLioncash
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.
2019-05-20yuzu/bootmanager: Specify string conversions explicitlyLioncash
Allows the bootmanager code to compile with implicit string conversions disabled.
2019-05-20yuzu/util: Specify string conversions explicitlyLioncash
Allows the util code to build with implicit string conversions disabled.
2019-05-20gl_shader_decompiler: Tidy up minor remaining cases of unnecessary ↵Lioncash
std::string concatenation
2019-05-20gl_shader_decompiler: Replace individual overloads with the fmt-based oneLioncash
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.
2019-05-20gl_shader_decompiler: Utilize fmt overload of AddLine() where applicableLioncash
2019-05-20Merge pull request #2499 from lioncash/translatebunnei
yuzu/configuration: Specify string conversions explicitly
2019-05-19Revert #2466Fernando Sahmkow
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.
2019-05-19gl_shader_decompiler: Add AddLine() overload that forwards to fmtLioncash
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.
2019-05-19Merge pull request #2441 from ReinUsesLisp/al2pbunnei
shader: Implement AL2P and ALD.PHYS