summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorrodolfoosvaldobogado <rodolfoosvaldobogado@gmail.com>2012-10-26 11:34:02 -0300
committerrodolfoosvaldobogado <rodolfoosvaldobogado@gmail.com>2012-10-26 11:34:02 -0300
commiteaa1ea71c1b5abda68ab46d1039b06b56a0bd074 (patch)
tree25033caee8482f21c7324df26217fb50ada654fc /Source/Core
parent7006cd12170c3b3dc3c6179a66945b5183995156 (diff)
Implement the new buffer approach in opengl. sadly in my machine it gives my only 2 more fps and if your hardware does not support ARB_map_buffer_range is even slower than plain vertex arrays.
change naming in all the backends vertex managers to make more easy to continue with the merge an some future improvements. please test this as i'm interested in knowing the performance in linux and windows with the different hardware platforms.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/LightingShaderGen.cpp2
-rw-r--r--Source/Core/VideoCommon/Src/NativeVertexFormat.h2
-rw-r--r--Source/Core/VideoCommon/Src/OpcodeDecoding.cpp4
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderGen.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/Src/LightingShaderGen.cpp b/Source/Core/VideoCommon/Src/LightingShaderGen.cpp
index a506acadfc..f32e5dfeee 100644
--- a/Source/Core/VideoCommon/Src/LightingShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/LightingShaderGen.cpp
@@ -23,7 +23,7 @@
int GetLightingShaderId(u32* out)
{
- for (int i = 0; i < xfregs.numChan.numColorChans; ++i)
+ for (u32 i = 0; i < xfregs.numChan.numColorChans; ++i)
{
out[i] = xfregs.color[i].enablelighting ?
(u32)xfregs.color[i].hex :
diff --git a/Source/Core/VideoCommon/Src/NativeVertexFormat.h b/Source/Core/VideoCommon/Src/NativeVertexFormat.h
index 02184fde1c..1340991b21 100644
--- a/Source/Core/VideoCommon/Src/NativeVertexFormat.h
+++ b/Source/Core/VideoCommon/Src/NativeVertexFormat.h
@@ -102,7 +102,7 @@ public:
virtual void SetupVertexPointers() = 0;
virtual void EnableComponents(u32 components) {}
- int GetVertexStride() const { return vertex_stride; }
+ u32 GetVertexStride() const { return vertex_stride; }
// TODO: move this under private:
u32 m_components; // VB_HAS_X. Bitmask telling what vertex components are present.
diff --git a/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp b/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
index 4f7f86d655..a1ff1a9985 100644
--- a/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
+++ b/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
@@ -346,7 +346,7 @@ static void Decode()
// Display lists get added directly into the FIFO stream
if (g_bRecordFifoData && cmd_byte != GX_CMD_CALL_DL)
- FifoRecorder::GetInstance().WriteGPCommand(opcodeStart, g_pVideoData - opcodeStart);
+ FifoRecorder::GetInstance().WriteGPCommand(opcodeStart, u32(g_pVideoData - opcodeStart));
}
static void DecodeSemiNop()
@@ -429,7 +429,7 @@ static void DecodeSemiNop()
}
if (g_bRecordFifoData && cmd_byte != GX_CMD_CALL_DL)
- FifoRecorder::GetInstance().WriteGPCommand(opcodeStart, g_pVideoData - opcodeStart);
+ FifoRecorder::GetInstance().WriteGPCommand(opcodeStart, u32(g_pVideoData - opcodeStart));
}
void OpcodeDecoder_Init()
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index bc7a12304f..3d5e676c61 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -196,7 +196,7 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo
*ptr++ = components;
}
- uid->num_values = ptr - uid->values;
+ uid->num_values = int(ptr - uid->values);
}
void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, DSTALPHA_MODE dstAlphaMode, u32 components)
@@ -229,7 +229,7 @@ void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, DSTALPHA_MODE dstAlphaMode, u
*ptr++ = bpmem.tevindref.hex; // 32
- for (int i = 0; i < bpmem.genMode.numtevstages+1; ++i) // up to 16 times
+ for (u32 i = 0; i < bpmem.genMode.numtevstages+1; ++i) // up to 16 times
{
*ptr++ = bpmem.combiners[i].colorC.hex; // 33+5*i
*ptr++ = bpmem.combiners[i].alphaC.hex; // 34+5*i