Corrections and styling

This commit is contained in:
Fernando Sahmkow 2019-04-23 08:02:24 -04:00
parent 701ce1c9d0
commit 021d28c9b8
5 changed files with 9 additions and 6 deletions

View file

@ -9,11 +9,14 @@
namespace Tegra::Engines::Upload { namespace Tegra::Engines::Upload {
State::State(MemoryManager& memory_manager, Data& regs)
: memory_manager(memory_manager), regs(regs) {}
void State::ProcessExec(const bool is_linear) { void State::ProcessExec(const bool is_linear) {
write_offset = 0; write_offset = 0;
copy_size = regs.line_length_in * regs.line_count; copy_size = regs.line_length_in * regs.line_count;
inner_buffer.resize(copy_size); inner_buffer.resize(copy_size);
linear = is_linear; this->is_linear = is_linear;
} }
void State::ProcessData(const u32 data, const bool is_last_call) { void State::ProcessData(const u32 data, const bool is_last_call) {

View file

@ -56,7 +56,7 @@ struct Data {
class State { class State {
public: public:
State(MemoryManager& memory_manager, Data& regs) : memory_manager(memory_manager), regs(regs) {} State(MemoryManager& memory_manager, Data& regs);
~State() = default; ~State() = default;
void ProcessExec(const bool is_linear); void ProcessExec(const bool is_linear);
@ -66,7 +66,7 @@ private:
u32 write_offset = 0; u32 write_offset = 0;
u32 copy_size = 0; u32 copy_size = 0;
std::vector<u8> inner_buffer; std::vector<u8> inner_buffer;
bool linear; bool is_linear;
Data& regs; Data& regs;
MemoryManager& memory_manager; MemoryManager& memory_manager;
}; };

View file

@ -34,7 +34,7 @@ void KeplerCompute::CallMethod(const GPU::MethodCall& method_call) {
break; break;
} }
case KEPLER_COMPUTE_REG_INDEX(data_upload): { case KEPLER_COMPUTE_REG_INDEX(data_upload): {
bool is_last_call = method_call.IsLastCall(); const bool is_last_call = method_call.IsLastCall();
upload_state.ProcessData(method_call.argument, is_last_call); upload_state.ProcessData(method_call.argument, is_last_call);
if (is_last_call) { if (is_last_call) {
system.GPU().Maxwell3D().dirty_flags.OnMemoryWrite(); system.GPU().Maxwell3D().dirty_flags.OnMemoryWrite();

View file

@ -31,7 +31,7 @@ void KeplerMemory::CallMethod(const GPU::MethodCall& method_call) {
break; break;
} }
case KEPLERMEMORY_REG_INDEX(data): { case KEPLERMEMORY_REG_INDEX(data): {
bool is_last_call = method_call.IsLastCall(); const bool is_last_call = method_call.IsLastCall();
upload_state.ProcessData(method_call.argument, is_last_call); upload_state.ProcessData(method_call.argument, is_last_call);
if (is_last_call) { if (is_last_call) {
system.GPU().Maxwell3D().dirty_flags.OnMemoryWrite(); system.GPU().Maxwell3D().dirty_flags.OnMemoryWrite();

View file

@ -258,7 +258,7 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) {
break; break;
} }
case MAXWELL3D_REG_INDEX(data_upload): { case MAXWELL3D_REG_INDEX(data_upload): {
bool is_last_call = method_call.IsLastCall(); const bool is_last_call = method_call.IsLastCall();
upload_state.ProcessData(method_call.argument, is_last_call); upload_state.ProcessData(method_call.argument, is_last_call);
if (is_last_call) { if (is_last_call) {
dirty_flags.OnMemoryWrite(); dirty_flags.OnMemoryWrite();