GSDX: Nonsense workaround for VS2010 crash issue. We suspect that memory is getting corrupted but we've failed to find the code responsible. Many different changes result in code that doesn't crash for no obvious reason, this one at least looks vaguely like sane code though.

Reverted optimisation flag for VS2010 release target.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5804 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1@gmail.com 2014-01-09 21:51:42 +00:00
parent a1f50d4306
commit 53c76b3780
3 changed files with 18 additions and 13 deletions

View File

@ -740,15 +740,10 @@ void GSDevice11::DoInterlace(GSTexture* st, GSTexture* dt, int shader, bool line
StretchRect(st, sr, dt, dr, m_interlace.ps[shader], m_interlace.cb, linear);
}
void GSDevice11::DoFXAA(GSTexture* st, GSTexture* dt)
// This shouldn't be necessary, we have some bug corrupting memory
// and for some reason isolating this code makes the plugin not crash
void GSDevice11::InitFXAA()
{
GSVector2i s = dt->GetSize();
GSVector4 sr(0, 0, 1, 1);
GSVector4 dr(0, 0, s.x, s.y);
FXAAConstantBuffer cb;
if (!FFXA_Compiled)
{
#if EXTERNAL_SHADER_LOADING
@ -763,6 +758,18 @@ void GSDevice11::DoFXAA(GSTexture* st, GSTexture* dt)
#endif
FFXA_Compiled = true;
}
}
void GSDevice11::DoFXAA(GSTexture* st, GSTexture* dt)
{
GSVector2i s = dt->GetSize();
GSVector4 sr(0, 0, 1, 1);
GSVector4 dr(0, 0, s.x, s.y);
FXAAConstantBuffer cb;
InitFXAA();
cb.rcpFrame = GSVector4(1.0f / s.x, 1.0f / s.y, 0.0f, 0.0f);
cb.rcpFrameOpt = GSVector4::zero();

View File

@ -39,6 +39,8 @@ class GSDevice11 : public GSDeviceDX
void DoFXAA(GSTexture* st, GSTexture* dt);
void DoShadeBoost(GSTexture* st, GSTexture* dt);
void InitFXAA(); // Bug workaround! Stack corruption? Heap corruption? No idea
//
CComPtr<ID3D11Device> m_dev;

View File

@ -302,7 +302,6 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<ModuleDefinitionFile>.\GSdx.def</ModuleDefinitionFile>
@ -321,7 +320,6 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSSE3|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<ModuleDefinitionFile>.\GSdx.def</ModuleDefinitionFile>
@ -400,7 +398,6 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE4|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<ModuleDefinitionFile>.\GSdx.def</ModuleDefinitionFile>
@ -410,7 +407,6 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<ModuleDefinitionFile>.\GSdx.def</ModuleDefinitionFile>