summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-15 17:48:54 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-09-19 17:41:27 +0200
commitba02d564f8a0b0167b96f247b6ad9d2bde05b6c8 (patch)
tree015edafb7deacabf4fea3c547534bb00ed60781f /src/video_core/engines/maxwell_3d.h
parentMerge pull request #2784 from ReinUsesLisp/smem (diff)
downloadyuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.tar
yuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.tar.gz
yuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.tar.bz2
yuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.tar.lz
yuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.tar.xz
yuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.tar.zst
yuzu-ba02d564f8a0b0167b96f247b6ad9d2bde05b6c8.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.h')
-rw-r--r--src/video_core/engines/maxwell_3d.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index e5ec90717..1547d930e 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -811,8 +811,9 @@ public:
INSERT_PADDING_WORDS(0x21);
u32 vb_element_base;
+ u32 vb_base_instance;
- INSERT_PADDING_WORDS(0x36);
+ INSERT_PADDING_WORDS(0x35);
union {
BitField<0, 1, u32> c0;
@@ -1238,6 +1239,11 @@ public:
/// Write the value to the register identified by method.
void CallMethod(const GPU::MethodCall& method_call);
+ /// Write the value to the register identified by method.
+ void CallMethodFromMME(const GPU::MethodCall& method_call);
+
+ void FlushMMEInlineDraw();
+
/// Given a Texture Handle, returns the TSC and TIC entries.
Texture::FullTextureInfo GetTextureInfo(const Texture::TextureHandle tex_handle,
std::size_t offset) const;
@@ -1263,6 +1269,18 @@ public:
return execute_on;
}
+ enum class MMMEDrawMode : u32 {
+ Undefined,
+ Array,
+ Indexed,
+ };
+
+ struct MMEDrawState {
+ MMMEDrawMode current_mode{MMMEDrawMode::Undefined};
+ u32 current_count;
+ u32 instance_count;
+ } mme_draw;
+
private:
void InitializeRegisterDefaults();
@@ -1275,6 +1293,8 @@ private:
/// Start offsets of each macro in macro_memory
std::array<u32, 0x80> macro_positions = {};
+ std::array<bool, Regs::NUM_REGS> mme_inline{};
+
/// Memory for macro code
MacroMemory macro_memory;
@@ -1402,6 +1422,7 @@ ASSERT_REG_POSITION(stencil_front_mask, 0x4E7);
ASSERT_REG_POSITION(frag_color_clamp, 0x4EA);
ASSERT_REG_POSITION(screen_y_control, 0x4EB);
ASSERT_REG_POSITION(vb_element_base, 0x50D);
+ASSERT_REG_POSITION(vb_base_instance, 0x50E);
ASSERT_REG_POSITION(clip_distance_enabled, 0x544);
ASSERT_REG_POSITION(point_size, 0x546);
ASSERT_REG_POSITION(zeta_enable, 0x54E);