summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-03-17 04:06:24 +0100
committerSubv <subv2112@gmail.com>2018-03-17 04:51:06 +0100
commitf93d769a1ca127eadfa2edeab03465aeb7552e8d (patch)
tree5bf6547fadfc303c49cdab20dfd0613917a6403d /src/video_core/engines/maxwell_3d.h
parentMerge pull request #241 from Subv/gpu_method_call (diff)
downloadyuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.tar
yuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.tar.gz
yuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.tar.bz2
yuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.tar.lz
yuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.tar.xz
yuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.tar.zst
yuzu-f93d769a1ca127eadfa2edeab03465aeb7552e8d.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.h')
-rw-r--r--src/video_core/engines/maxwell_3d.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 8870ef119..3708b31ee 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -4,6 +4,7 @@
#pragma once
+#include <array>
#include <unordered_map>
#include <vector>
#include "common/bit_field.h"
@@ -104,7 +105,7 @@ public:
u32 gpr_alloc;
ShaderType type;
INSERT_PADDING_WORDS(9);
- } shader_config[6];
+ } shader_config[MaxShaderProgram];
INSERT_PADDING_WORDS(0x5D0);
@@ -120,6 +121,19 @@ public:
static_assert(sizeof(Regs) == Regs::NUM_REGS * sizeof(u32), "Maxwell3D Regs has wrong size");
+ struct State {
+ struct ShaderInfo {
+ Regs::ShaderType type;
+ Regs::ShaderProgram program;
+ GPUVAddr begin_address;
+ GPUVAddr end_address;
+ };
+
+ std::array<ShaderInfo, Regs::MaxShaderProgram> shaders;
+ };
+
+ State state;
+
private:
MemoryManager& memory_manager;
@@ -130,7 +144,7 @@ private:
void DrawArrays();
/// Method call handlers
- void PrepareShader(const std::vector<u32>& parameters);
+ void SetShader(const std::vector<u32>& parameters);
struct MethodInfo {
const char* name;