summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-10-01 08:21:24 -0400
committerGitHub <noreply@github.com>2016-10-01 08:21:24 -0400
commit4eeb158b58cc935ed75fd55c9629f0fc14ad447f (patch)
tree46420ab9fb8b976f06d9b7d320a28e7fd957b880 /Source/Core/VideoCommon
parent8017e11784c3b6094f66b3255a006abf141c302e (diff)
parent361c7c9c0999d16d2aaf6da2f0d45a70902f4127 (diff)
Merge pull request #4268 from lioncash/cast
VertexManagerBase: Get rid of a u16 cast
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.h b/Source/Core/VideoCommon/VertexManagerBase.h
index 36ffc30410..cbc1d63d84 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.h
+++ b/Source/Core/VideoCommon/VertexManagerBase.h
@@ -33,18 +33,19 @@ struct Slope
class VertexManagerBase
{
private:
- static const u32 SMALLEST_POSSIBLE_VERTEX = sizeof(float) * 3; // 3 pos
- static const u32 LARGEST_POSSIBLE_VERTEX =
- sizeof(float) * 45 + sizeof(u32) * 2; // 3 pos, 3*3 normal, 2*u32 color, 8*4 tex, 1 posMat
+ // 3 pos
+ static constexpr u32 SMALLEST_POSSIBLE_VERTEX = sizeof(float) * 3;
+ // 3 pos, 3*3 normal, 2*u32 color, 8*4 tex, 1 posMat
+ static constexpr u32 LARGEST_POSSIBLE_VERTEX = sizeof(float) * 45 + sizeof(u32) * 2;
- static const u32 MAX_PRIMITIVES_PER_COMMAND = (u16)-1;
+ static constexpr u32 MAX_PRIMITIVES_PER_COMMAND = 65535;
public:
- static const u32 MAXVBUFFERSIZE =
+ static constexpr u32 MAXVBUFFERSIZE =
ROUND_UP_POW2(MAX_PRIMITIVES_PER_COMMAND * LARGEST_POSSIBLE_VERTEX);
// We may convert triangle-fans to triangle-lists, almost 3x as many indices.
- static const u32 MAXIBUFFERSIZE = ROUND_UP_POW2(MAX_PRIMITIVES_PER_COMMAND * 3);
+ static constexpr u32 MAXIBUFFERSIZE = ROUND_UP_POW2(MAX_PRIMITIVES_PER_COMMAND * 3);
VertexManagerBase();
// needs to be virtual for DX11's dtor