summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-02-21 23:12:53 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-02-21 23:12:53 -0600
commit21bd5be753efb016ab5e3a75bf5e6f8e71a3576a (patch)
tree4d5d6d3bfe6bd97c00ab0c0b153384f76ee053b6 /Source/Core/VideoCommon
parentf16dcfe6f69c0cb8ba89ea6611157c8c2eab3dad (diff)
Buffer size changes.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/VertexManagerBase.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexManagerBase.h b/Source/Core/VideoCommon/Src/VertexManagerBase.h
index 5169422b3c..d846a65b90 100644
--- a/Source/Core/VideoCommon/Src/VertexManagerBase.h
+++ b/Source/Core/VideoCommon/Src/VertexManagerBase.h
@@ -7,25 +7,28 @@ class PointerWrap;
class VertexManager
{
+private:
+ // What are the actual values?
+ static const u32 SMALLEST_POSSIBLE_VERTEX = 1;
+ static const u32 LARGEST_POSSIBLE_VERTEX = 188;
+
+ static const u32 MAX_PRIMITIVES_PER_COMMAND = (u16)-1;
+
public:
-
- enum
- {
- // values from OGL backend
- //MAXVBUFFERSIZE = 0x1FFFF,
- //MAXIBUFFERSIZE = 0xFFFF,
-
- // values from DX9 backend
- //MAXVBUFFERSIZE = 0x50000,
- //MAXIBUFFERSIZE = 0xFFFF,
-
- // values from DX11 backend
- MAXVBUFFERSIZE = 0x50000,
- MAXIBUFFERSIZE = 0xFFFF,
- };
+ // values from OGL backend
+ //static const u32 MAXVBUFFERSIZE = 0x1FFFF;
+
+ // values from DX9/11 backend
+ static const u32 MAXVBUFFERSIZE = MAX_PRIMITIVES_PER_COMMAND * LARGEST_POSSIBLE_VERTEX;
+
+ // We may convert triangle-fans to triangle-lists, almost 3x as many indices.
+ // Watching for a full index buffer would probably be smarter than this calculation.
+ static const u32 MAXIBUFFERSIZE = MAXVBUFFERSIZE * 3 / SMALLEST_POSSIBLE_VERTEX;
+ //static const u32 MAXIBUFFERSIZE = MAX_PRIMITIVES_PER_COMMAND * 3;
VertexManager();
- virtual ~VertexManager(); // needs to be virtual for DX11's dtor
+ // needs to be virtual for DX11's dtor
+ virtual ~VertexManager();
static void AddVertices(int _primitive, u32 _numVertices);