- May 20, 2019
-
-
Lioncash authored
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.
-
Lioncash authored
-
- May 19, 2019
-
-
Lioncash authored
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.
-
Fernando Sahmkow authored
This is a measure to avoid crashes on command list reading as an empty command_list is considered a NOP.
-
Lioncash authored
constexpr internally links by default, so the inline specifier is unnecessary.
-
Lioncash authored
Many of these constructors don't even need to be templated. The only ones that need to be templated are the ones that actually make use of the parameter pack. Even then, since std::vector accepts an initializer list, we can supply the parameter pack directly to it instead of creating our own copy of the list, then copying it again into the std::vector.
-
Lioncash authored
shader/shader_ir: Remove unnecessary template parameter packs from Operation() overloads where applicable These overloads don't actually make use of the parameter pack, so they can be turned into regular non-template function overloads.
-
Lioncash authored
These don't actually modify instance state, so they can be marked as const member functions
-
Lioncash authored
This has been left unused since the removal of the vestigial surface viewer. Given it has no uses left, this can be removed as well.
-
Lioncash authored
Given the class contains quite a lot of non-trivial types, place the constructor and destructor within the cpp file to avoid inlining construction and destruction code everywhere the class is used.
-
Lioncash authored
Avoids performing copies into the pair being returned. Instead, we can just move the resources into the pair, avoiding the need to make copies of both the std::string and ShaderEntries struct.
-
Lioncash authored
Given the offset is assigned a fixed value in the constructor, we can just assign it directly and get rid of the need to write the name of the variable again in the constructor initializer list.
-
Lioncash authored
Given the disk shader cache contains non-trivial types, we should default it in the cpp file in order to prevent inlining of the complex destruction logic.
-
Lioncash authored
The standard library expects hash specializations that don't throw exceptions. Make this explicit in the type to allow selection of better code paths if possible in implementations.
-
Lioncash authored
We don't need to load the code into a vector and then construct a string over the data. We can just create a string with the necessary size ahead of time, and read the data directly into it, getting rid of an unnecessary heap allocation.
-
Lioncash authored
std::move does nothing when applied to a const variable. Resources can't be moved if the object is immutable. With this change, we don't end up making several unnecessary heap allocations and copies.
-
Lioncash authored
Booleans don't have a guaranteed size, but we still want to have them integrate into the disk cache system without needing to actually use a different type. We can do this by supplying non-template overloads for the bool type. Non-template overloads always have precedence during function resolution, so this is safe to provide. This gets rid of the need to smatter ternary conditionals, as well as the need to use u8 types to store the value in.
-
Lioncash authored
This is a user-facing string, so it should be marked as translatable.
-
Lioncash authored
Allows the graphics breakpoints to compile with implicit string conversions disabled.
-
Lioncash authored
This allows the microprofile widget to compile with implicit string conversions disabled.
-
Lioncash authored
Allows compiling the wait tree widget with implicit string conversions disabled.
-
Lioncash authored
Currently, this overload isn't used, so this wasn't actually hit in any code, only the float overload is used.
-
- May 18, 2019
-
-
Lioncash authored
These are only used from within this translation unit, so they don't need to have external linkage. They were intended to be marked with this anyways to be consistent with the other service functions.
-
Lioncash authored
Previously this would fall through and return successfully, despite being an out of bounds read or write.
-
Lioncash authored
Renames the members to more accurately indicate what they signify. "OneShot" and "Sticky" are kind of ambiguous identifiers for the reset types, and can be kind of misleading. Automatic and Manual communicate the kind of reset type in a clearer manner. Either the event is automatically reset, or it isn't and must be manually cleared. The "OneShot" and "Sticky" terminology is just a hold-over from Citra where the kernel had a third type of event reset type known as "Pulse". Given the Switch kernel only has two forms of event reset types, we don't need to keep the old terminology around anymore.
-
ReinUsesLisp authored
-
- May 17, 2019
-
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
Compatibility profile and the disk shader cache settings shouldn't be changed at runtime. This aims to address that shadowing those options.
-
ReinUsesLisp authored
-
ReinUsesLisp authored
The SDL2 frontend never bound the OpenGL context, resulting on a white screen and no-ops all over the backend.
-
ReinUsesLisp authored
Nvidia's proprietary driver creates a real OpenGL compatibility profile without this option, meanwhile Intel (and probably AMD, I haven't tested it) require that QSurfaceFormat::FormatOption::DeprecatedFunctions is explicitly enabled.
-
- May 14, 2019
-
-
Fernando Sahmkow authored
This was reduced due to happening on most games and at such constant rate that it affected performance heavily for the end user. In general, we are well aware of the assert and an implementation is already planned.
-
Lioncash authored
Silences a -Wreorder warning.
-
Lioncash authored
Avoids inlining destruction logic where applicable, and also makes forward declarations not cause unexpected compilation errors depending on where the State class is used.
-
Lioncash authored
These only apply in the definition of the function. They can be omitted from the declaration.
-
Lioncash authored
-
Lioncash authored
We can use the named constant instead of using 32 directly.
-
Lioncash authored
video_core/engines/maxwell_3d: Simplify for loops into ranged for loops within InitializeRegisterDefaults() Lessens the amount of code that needs to be read, and gets rid of the need to introduce an indexing variable. Instead, we just operate on the objects directly.
-
Lioncash authored
std::memset is used to clear the entire register structure, which requires that the Regs struct be trivially copyable (otherwise undefined behavior is invoked). This prevents the case where a non-trivial type is potentially added to the struct.
-