summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-04-23 14:02:24 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-04-23 14:02:24 +0200
commit021d28c9b81d86d52b989b4cc6828f33c6a63c9b (patch)
tree9b0245e332e799469a90c99069e3647303556c06 /src/video_core
parentImplement Maxwell3D Data Upload (diff)
downloadyuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.tar
yuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.tar.gz
yuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.tar.bz2
yuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.tar.lz
yuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.tar.xz
yuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.tar.zst
yuzu-021d28c9b81d86d52b989b4cc6828f33c6a63c9b.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/engines/engine_upload.cpp5
-rw-r--r--src/video_core/engines/engine_upload.h4
-rw-r--r--src/video_core/engines/kepler_compute.cpp2
-rw-r--r--src/video_core/engines/kepler_memory.cpp2
-rw-r--r--src/video_core/engines/maxwell_3d.cpp2
5 files changed, 9 insertions, 6 deletions
diff --git a/src/video_core/engines/engine_upload.cpp b/src/video_core/engines/engine_upload.cpp
index 201f8e273..663d5517a 100644
--- a/src/video_core/engines/engine_upload.cpp
+++ b/src/video_core/engines/engine_upload.cpp
@@ -9,11 +9,14 @@
namespace Tegra::Engines::Upload {
+State::State(MemoryManager& memory_manager, Data& regs)
+ : memory_manager(memory_manager), regs(regs) {}
+
void State::ProcessExec(const bool is_linear) {
write_offset = 0;
copy_size = regs.line_length_in * regs.line_count;
inner_buffer.resize(copy_size);
- linear = is_linear;
+ this->is_linear = is_linear;
}
void State::ProcessData(const u32 data, const bool is_last_call) {
diff --git a/src/video_core/engines/engine_upload.h b/src/video_core/engines/engine_upload.h
index 3a817140a..431f56030 100644
--- a/src/video_core/engines/engine_upload.h
+++ b/src/video_core/engines/engine_upload.h
@@ -56,7 +56,7 @@ struct Data {
class State {
public:
- State(MemoryManager& memory_manager, Data& regs) : memory_manager(memory_manager), regs(regs) {}
+ State(MemoryManager& memory_manager, Data& regs);
~State() = default;
void ProcessExec(const bool is_linear);
@@ -66,7 +66,7 @@ private:
u32 write_offset = 0;
u32 copy_size = 0;
std::vector<u8> inner_buffer;
- bool linear;
+ bool is_linear;
Data& regs;
MemoryManager& memory_manager;
};
diff --git a/src/video_core/engines/kepler_compute.cpp b/src/video_core/engines/kepler_compute.cpp
index 28f1f6a7d..7404a8163 100644
--- a/src/video_core/engines/kepler_compute.cpp
+++ b/src/video_core/engines/kepler_compute.cpp
@@ -34,7 +34,7 @@ void KeplerCompute::CallMethod(const GPU::MethodCall& method_call) {
break;
}
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);
if (is_last_call) {
system.GPU().Maxwell3D().dirty_flags.OnMemoryWrite();
diff --git a/src/video_core/engines/kepler_memory.cpp b/src/video_core/engines/kepler_memory.cpp
index 71fa499d3..0561f676c 100644
--- a/src/video_core/engines/kepler_memory.cpp
+++ b/src/video_core/engines/kepler_memory.cpp
@@ -31,7 +31,7 @@ void KeplerMemory::CallMethod(const GPU::MethodCall& method_call) {
break;
}
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);
if (is_last_call) {
system.GPU().Maxwell3D().dirty_flags.OnMemoryWrite();
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 78810dbbb..d7b586db9 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -258,7 +258,7 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) {
break;
}
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);
if (is_last_call) {
dirty_flags.OnMemoryWrite();