summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/fermi_2d.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-18 10:57:49 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:33 +0200
commit175aa343ff1c9f931b266caf2d19b8df943dab0d (patch)
treec9cdf1f449232c7fc0728be6bbc86d8537ff44aa /src/video_core/engines/fermi_2d.h
parentgl_shader_decompiler: Implement image binding settings (diff)
downloadyuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.gz
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.bz2
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.lz
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.xz
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.zst
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.zip
Diffstat (limited to 'src/video_core/engines/fermi_2d.h')
-rw-r--r--src/video_core/engines/fermi_2d.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h
index 3d28afa91..0a4c7c5ad 100644
--- a/src/video_core/engines/fermi_2d.h
+++ b/src/video_core/engines/fermi_2d.h
@@ -9,6 +9,7 @@
#include "common/bit_field.h"
#include "common/common_funcs.h"
#include "common/common_types.h"
+#include "common/math_util.h"
#include "video_core/gpu.h"
namespace Tegra {
@@ -38,6 +39,26 @@ public:
/// Write the value to the register identified by method.
void CallMethod(const GPU::MethodCall& method_call);
+ enum class Origin : u32 {
+ Center = 0,
+ Corner = 1,
+ };
+
+ enum class Filter : u32 {
+ PointSample = 0, // Nearest
+ Linear = 1,
+ };
+
+ enum class Operation : u32 {
+ SrcCopyAnd = 0,
+ ROPAnd = 1,
+ Blend = 2,
+ SrcCopy = 3,
+ ROP = 4,
+ SrcCopyPremult = 5,
+ BlendPremult = 6,
+ };
+
struct Regs {
static constexpr std::size_t NUM_REGS = 0x258;
@@ -76,16 +97,6 @@ public:
};
static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size");
- enum class Operation : u32 {
- SrcCopyAnd = 0,
- ROPAnd = 1,
- Blend = 2,
- SrcCopy = 3,
- ROP = 4,
- SrcCopyPremult = 5,
- BlendPremult = 6,
- };
-
union {
struct {
INSERT_PADDING_WORDS(0x80);
@@ -102,7 +113,11 @@ public:
INSERT_PADDING_WORDS(0x177);
- u32 blit_control;
+ union {
+ u32 raw;
+ BitField<0, 1, Origin> origin;
+ BitField<4, 1, Filter> filter;
+ } blit_control;
INSERT_PADDING_WORDS(0x8);
@@ -121,6 +136,13 @@ public:
};
} regs{};
+ struct Config {
+ Operation operation;
+ Filter filter;
+ Common::Rectangle<u32> src_rect;
+ Common::Rectangle<u32> dst_rect;
+ };
+
private:
VideoCore::RasterizerInterface& rasterizer;
MemoryManager& memory_manager;