mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 05:35:07 +01:00
Remove Maxwell3D Zero Initialization Calls
A lot of calls in Maxwell3D register initialization ended up setting the register to 0 which should be implicit behavior and most calls would be eliminated by the redundancy check which had to be manually disabled. It was determined to be better to move this responsibility to the called function to initialize to state equivalent to the corresponding register being 0. All initialization calls with the argument as 0 have been removed now due to this, it was the vast majority of calls.
This commit is contained in:
parent
49cc0964e2
commit
586bee2c59
File diff suppressed because it is too large
Load Diff
@ -41,10 +41,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
return;
|
||||
}
|
||||
|
||||
HandleMethod(method, argument, true);
|
||||
HandleMethod(method, argument);
|
||||
}
|
||||
|
||||
void Maxwell3D::HandleMethod(u32 method, u32 argument, bool redundantCheck) {
|
||||
void Maxwell3D::HandleMethod(u32 method, u32 argument) {
|
||||
#define MAXWELL3D_OFFSET(field) (sizeof(typeof(Registers::field)) - sizeof(typeof(*Registers::field))) / sizeof(u32)
|
||||
#define MAXWELL3D_STRUCT_OFFSET(field, member) MAXWELL3D_OFFSET(field) + U32_OFFSET(typeof(*Registers::field), member)
|
||||
#define MAXWELL3D_ARRAY_OFFSET(field, index) MAXWELL3D_OFFSET(field) + ((sizeof(typeof(Registers::field[0])) / sizeof(u32)) * index)
|
||||
@ -73,7 +73,7 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
argument = shadowRegisters.raw[method];
|
||||
}
|
||||
|
||||
bool redundant{redundantCheck && registers.raw[method] == argument};
|
||||
bool redundant{registers.raw[method] == argument};
|
||||
registers.raw[method] = argument;
|
||||
|
||||
if (!redundant) {
|
||||
|
@ -32,7 +32,7 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
/**
|
||||
* @brief Calls the appropriate function corresponding to a certain method with the supplied argument
|
||||
*/
|
||||
void HandleMethod(u32 method, u32 argument, bool redundantCheck = false);
|
||||
void HandleMethod(u32 method, u32 argument);
|
||||
|
||||
/**
|
||||
* @brief Writes back a semaphore result to the guest with an auto-generated timestamp (if required)
|
||||
|
Loading…
Reference in New Issue
Block a user