summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/BPStructs.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-03-15 22:49:26 +0100
committerdegasus <wickmarkus@web.de>2013-03-15 22:49:26 +0100
commite1a081ad2dee7127e6c1fe2827eb1eb59ca24c6e (patch)
tree8dae4955fd719a1044fb39c4e68e3121326b5b34 /Source/Core/VideoCommon/Src/BPStructs.cpp
parent8767b30f75db5732023d9ebf9d93573f3b839e50 (diff)
parent363d0be9f98bdb76436ae298daff519c7eb4486b (diff)
Merge branch 'GLSL-master'
Merge an endless story. The branch name is a lie, it was started as glsl, but now it is a complete reworked opengl3 backend. It just began with simple changes which aren't supported on osx. They either support ogl2 OR ogl3 core, but mixing isn't allowed. As the branch name says, the vicious circle starts with GLSL, but just implementing one wasn't possible either: - OSX supports only GLSL100 which doesn't support our shaders. - Vertex Array Objects are needed for ogl3, but not supported on ogl2 - immediate mode isn't supported any more, so we must implement vertex buffers - uniform buffers are recommended as else we would need tons glUniform - postprocessing shaders have to be converted to glsl - lots of smaller outdated issues and bug fixes :-) Thanks at all for testing and at Sonic for converting all of our shaders to glsl130 And sorry for all upcoming bugs...
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/BPStructs.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp
index fa6bc08966..99a03487d6 100644
--- a/Source/Core/VideoCommon/Src/BPStructs.cpp
+++ b/Source/Core/VideoCommon/Src/BPStructs.cpp
@@ -225,6 +225,8 @@ void BPWritten(const BPCmd& bp)
{
PRIM_LOG("constalpha: alp=%d, en=%d", bpmem.dstalpha.alpha, bpmem.dstalpha.enable);
PixelShaderManager::SetDestAlpha(bpmem.dstalpha);
+ if(bp.changes & 0x100)
+ SetBlendMode();
break;
}
// This is called when the game is done drawing the new frame (eg: like in DX: Begin(); Draw(); End();)
@@ -459,6 +461,8 @@ void BPWritten(const BPCmd& bp)
g_renderer->SetColorMask(); // alpha writing needs to be disabled if the new pixel format doesn't have an alpha channel
g_renderer->SetBlendMode(true);
OnPixelFormatChange();
+ if(bp.changes & 3)
+ SetBlendMode(); // dual source could be activated by changing to PIXELFMT_RGBA6_Z24
break;
case BPMEM_MIPMAP_STRIDE: // MipMap Stride Channel
@@ -576,8 +580,6 @@ void BPWritten(const BPCmd& bp)
// ------------------------
case BPMEM_TX_SETMODE0: // (0x90 for linear)
case BPMEM_TX_SETMODE0_4:
- // Shouldn't need to call this here, we call it for each active texture right before rendering
- SetTextureMode(bp);
break;
case BPMEM_TX_SETMODE1:
@@ -720,14 +722,6 @@ void BPReload()
SetColorMask();
OnPixelFormatChange();
{
- BPCmd bp = {BPMEM_TX_SETMODE0, 0xFFFFFF, static_cast<int>(((u32*)&bpmem)[BPMEM_TX_SETMODE0])};
- SetTextureMode(bp);
- }
- {
- BPCmd bp = {BPMEM_TX_SETMODE0_4, 0xFFFFFF, static_cast<int>(((u32*)&bpmem)[BPMEM_TX_SETMODE0_4])};
- SetTextureMode(bp);
- }
- {
BPCmd bp = {BPMEM_FIELDMASK, 0xFFFFFF, static_cast<int>(((u32*)&bpmem)[BPMEM_FIELDMASK])};
SetInterlacingMode(bp);
}