summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/NativeVertexFormat.h14
-rw-r--r--Source/Core/VideoCommon/Src/XFBConvert.h8
2 files changed, 16 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/Src/NativeVertexFormat.h b/Source/Core/VideoCommon/Src/NativeVertexFormat.h
index bcfb9fd95d..bad74a8b63 100644
--- a/Source/Core/VideoCommon/Src/NativeVertexFormat.h
+++ b/Source/Core/VideoCommon/Src/NativeVertexFormat.h
@@ -89,14 +89,16 @@ struct PortableVertexDeclaration
// all the data loading code must always be made compatible.
class NativeVertexFormat
{
- u8* m_compiledCode;
- PortableVertexDeclaration vtx_decl;
+protected:
+ NativeVertexFormat() {}
+
public:
- NativeVertexFormat();
- ~NativeVertexFormat();
+ virtual ~NativeVertexFormat() {}
+
+ virtual void Initialize(const PortableVertexDeclaration &vtx_decl) = 0;
+ virtual void SetupVertexPointers() const = 0;
- void Initialize(const PortableVertexDeclaration &vtx_decl);
- void SetupVertexPointers() const;
+ static NativeVertexFormat *Create();
// TODO: move these in under private:
u32 m_components; // VB_HAS_X. Bitmask telling what vertex components are present.
diff --git a/Source/Core/VideoCommon/Src/XFBConvert.h b/Source/Core/VideoCommon/Src/XFBConvert.h
index f1a41a245e..a1b6a5704a 100644
--- a/Source/Core/VideoCommon/Src/XFBConvert.h
+++ b/Source/Core/VideoCommon/Src/XFBConvert.h
@@ -20,8 +20,16 @@
#include "Common.h"
+// This must be called once before calling the two conversion functions
+// below.
void InitXFBConvTables();
+// These implementations could likely be made considerably faster by
+// reducing precision so that intermediate calculations are done in
+// 15-bit precision instead of 32-bit. However, this would complicate
+// the code and since we have a GPU implementation too, there really
+// isn't much point.
+
// Converts 4:2:2 YUV (YUYV) data to 32-bit RGBA data.
void ConvertFromXFB(u32 *dst, const u8* _pXFB, int width, int height);