Skip to content

Commit

Permalink
D3D9: Disable CG by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-n committed Mar 28, 2024
1 parent 00755cb commit 30138c6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions SourceCode/RenderDll/XRenderD3D9/D3DCGPShader.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class CCGPShader_D3D : public CPShader
}
void mfInit()
{
#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
// NOTE: AMD64 port: find the 64-bit CG runtime
if (!gcpRendD3D->m_CGContext)
{
Expand Down Expand Up @@ -260,7 +260,7 @@ class CCGPShader_D3D : public CPShader

char *mfLoadCG_Int(char *prog_text)
{
#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
// NOTE: AMD64 port: find the 64-bit CG runtime
CGprofile pr = (CGprofile)m_CGProfileType;
//if (pr == CG_PROFILE_PS_1_1)
Expand Down
2 changes: 1 addition & 1 deletion SourceCode/RenderDll/XRenderD3D9/D3DCGVProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ bool CCGVProgram_D3D::mfActivate(CVProgram *pPosVP)
CloseHandle(hdst);
}
}
#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
// NOTE: AMD64 port: find the 64-bit CG runtime
if (m_Insts[m_CurInst].m_CGProgram)
cgDestroyProgram(m_Insts[m_CurInst].m_CGProgram);
Expand Down
2 changes: 1 addition & 1 deletion SourceCode/RenderDll/XRenderD3D9/D3DCGVProgram.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class CCGVProgram_D3D : public CVProgram
}
void mfInit()
{
#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
// NOTE: AMD64 port: find the 64-bit CG runtime
if (!gcpRendD3D->m_CGContext)
{
Expand Down
4 changes: 2 additions & 2 deletions SourceCode/RenderDll/XRenderD3D9/D3DSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void CD3D9Renderer::ShutDown(bool bReInit)
}
}

#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
// NOTE: AMD64 port: find the 64-bit CG runtime
if (m_CGContext)
{
Expand Down Expand Up @@ -1029,7 +1029,7 @@ WIN_HWND CD3D9Renderer::Init(int x,int y,int width,int height,unsigned int cbpp,

m_numtmus = di->Caps.MaxSimultaneousTextures;

#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
// NOTE: AMD64 port: find the 64-bit CG runtime
if (!m_CGContext)
{
Expand Down
4 changes: 2 additions & 2 deletions SourceCode/RenderDll/XRenderD3D9/DriverD3D9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4150,7 +4150,7 @@ char* CD3D9Renderer::GetVertexProfile(bool bSupportedProfile)

if (bSupportedProfile)
{
#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
pr = cgD3D9GetLatestVertexProfile();
#else
if (GetFeatures() & RFT_HW_PS20)
Expand All @@ -4176,7 +4176,7 @@ char* CD3D9Renderer::GetPixelProfile(bool bSupportedProfile)

if (bSupportedProfile)
{
#ifndef WIN64
#if !defined(WIN64) && defined(USE_CG)
pr = cgD3D9GetLatestPixelProfile();
if (pr == CG_PROFILE_PS_1_2 || pr == CG_PROFILE_PS_1_3)
pr = CG_PROFILE_PS_1_1;
Expand Down
2 changes: 1 addition & 1 deletion SourceCode/RenderDll/XRenderD3D9/DriverD3D9.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ class CD3D9Renderer : public CRenderer
bool AllocateVBChunk(int size, TVertPool *Ptr, SVertexStream *pVB, const char *szSource);
bool ReleaseVBChunk(TVertPool *Ptr, SVertexStream *pVB);

#if !defined(_XBOX) && !defined(WIN64)
#if !defined(_XBOX) && !defined(WIN64) && defined(USE_CG)
CGcontext m_CGContext;
#endif

Expand Down
2 changes: 1 addition & 1 deletion SourceCode/RenderDll/XRenderD3D9/XRenderD3D9.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>Winmm.lib;version.lib;d3d9.lib;d3dx9.lib;DXErr.lib;cg.lib;cgD3D9.lib;legacy_stdio_definitions.lib;ijl15.lib;nvDXTlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Winmm.lib;version.lib;d3d9.lib;d3dx9.lib;DXErr.lib;legacy_stdio_definitions.lib;ijl15.lib;nvDXTlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\DX9SDK\Lib;Libraries;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down

0 comments on commit 30138c6

Please sign in to comment.