diff options
| author | degasus <wickmarkus@web.de> | 2013-01-14 21:36:31 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2013-01-14 21:36:31 +0100 |
| commit | 2f78986e2cc28c7093bb9b7a784d1b3c0ce2e682 (patch) | |
| tree | 3fff77fd5721203782567248025a20f91cc441e9 /Source/Core | |
| parent | ff5ac8c5058df935e978141be89131eb4be130f8 (diff) | |
| parent | 1919a458e88fc1a06567b9496c6c47d34b9df5f2 (diff) | |
Merge branch 'Graphic_Update' into GLSL-master
Conflicts:
Source/Core/VideoCommon/Src/VertexManagerBase.cpp
Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
Diffstat (limited to 'Source/Core')
5 files changed, 9 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/Src/LightingShaderGen.cpp b/Source/Core/VideoCommon/Src/LightingShaderGen.cpp index 5933a7d28f..2b717bdba6 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 26e33a9beb..7969fcc86d 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -192,7 +192,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) @@ -225,7 +225,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 diff --git a/Source/Core/VideoCommon/Src/VertexManagerBase.cpp b/Source/Core/VideoCommon/Src/VertexManagerBase.cpp index 5be72e4fcf..bcd46c5faf 100644 --- a/Source/Core/VideoCommon/Src/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/Src/VertexManagerBase.cpp @@ -163,6 +163,9 @@ void VertexManager::Flush() // loading a state will invalidate BP, so check for it g_video_backend->CheckInvalidState(); + if (LocalVBuffer == s_pCurBufferPointer) return; + if (Flushed) return; + Flushed = true; g_vertex_manager->vFlush(); } |
