Integrating latest 47acbe8

This commit is contained in:
alexpete
2021-03-25 13:57:57 -07:00
parent 448c549698
commit 75dc720198
10312 changed files with 2711566 additions and 671451 deletions
@@ -118,9 +118,7 @@ bool SPostEffectsUtils::Create()
CreateRenderTarget("$BackBufferScaledTemp_d2", CTexture::s_ptexBackBufferScaledTemp[0], nWidth >> 1, nHeight >> 1, Clr_Unknown, 1, 0, eTF_R8G8B8A8, -1, FT_DONT_RELEASE);
CreateRenderTarget("$WaterVolumeRefl", CTexture::s_ptexWaterVolumeRefl[0], nWidth >> 1, nHeight >> 1, Clr_Unknown, 1, true, nHDRReducedFormat, TO_WATERVOLUMEREFLMAP, FT_DONT_RELEASE);
//CTexture::s_ptexWaterVolumeRefl[0]->DisableMgpuSync();
CreateRenderTarget("$WaterVolumeReflPrev", CTexture::s_ptexWaterVolumeRefl[1], nWidth >> 1, nHeight >> 1, Clr_Unknown, 1, true, nHDRReducedFormat, TO_WATERVOLUMEREFLMAPPREV, FT_DONT_RELEASE);
//CTexture::s_ptexWaterVolumeRefl[1]->DisableMgpuSync();
CreateRenderTarget("$BackBufferScaled_d4", CTexture::s_ptexBackBufferScaled[1], nWidth >> 2, nHeight >> 2, Clr_Unknown, 1, 0, eTF_R8G8B8A8, TO_BACKBUFFERSCALED_D4, FT_DONT_RELEASE);
CreateRenderTarget("$BackBufferScaledTemp_d4", CTexture::s_ptexBackBufferScaledTemp[1], nWidth >> 2, nHeight >> 2, Clr_Unknown, 1, 0, eTF_R8G8B8A8, -1, FT_DONT_RELEASE);
@@ -137,7 +135,6 @@ bool SPostEffectsUtils::Create()
// Water phys simulation requires data overframes, need to handle for each GPU in MGPU mode
CreateRenderTarget("$WaterRipplesDDN_0", CTexture::s_ptexWaterRipplesDDN, 256, 256, Clr_Unknown, 1, true, eTF_R8G8B8A8, TO_WATERRIPPLESMAP);
//CTexture::s_ptexWaterRipplesDDN->DisableMgpuSync();
if (gRenDev->UseHalfFloatRenderTargets())
{
CreateRenderTarget("$WaterVolumeDDN", CTexture::s_ptexWaterVolumeDDN, 64, 64, Clr_Unknown, 1, true, eTF_R16G16B16A16F, TO_WATERVOLUMEMAP);
@@ -146,7 +143,6 @@ bool SPostEffectsUtils::Create()
{
CreateRenderTarget("$WaterVolumeDDN", CTexture::s_ptexWaterVolumeDDN, 64, 64, Clr_Unknown, 1, true, eTF_R8G8B8A8, TO_WATERVOLUMEMAP);
}
//CTexture::s_ptexWaterVolumeDDN->DisableMgpuSync();
if (CRenderer::CV_r_watervolumecaustics && CRenderer::CV_r_watercaustics) //@NOTE: CV_r_watercaustics will be removed when the infinite ocean component feature toggle is removed.
{
@@ -495,7 +495,6 @@ AllocateConstIntCVar(CRenderer, CV_r_shaderslazyunload);
AllocateConstIntCVar(CRenderer, CV_r_shadersdebug);
#if !defined(CONSOLE)
int CRenderer::CV_r_shadersorbis;
int CRenderer::CV_r_shadersdurango;
int CRenderer::CV_r_shadersdx10;
int CRenderer::CV_r_shadersdx11;
int CRenderer::CV_r_shadersGL4;
@@ -922,10 +921,6 @@ static void ShadersOptimise([[maybe_unused]] IConsoleCmdArgs* Cmd)
{
ShadersOptimizeHelper(CParserBin::SetupForGLES3, " GLSL-ES 3");
}
if (CRenderer::CV_r_shadersdurango)
{
ShadersOptimizeHelper(CParserBin::SetupForDurango, "Durango");
}
if (CRenderer::CV_r_shadersorbis)
{
ShadersOptimizeHelper(CParserBin::SetupForOrbis, "Orbis");
@@ -2846,7 +2841,6 @@ void CRenderer::InitRenderer()
REGISTER_CVAR3("r_ShadersDX11", CV_r_shadersdx11, 0, VF_NULL, "");
REGISTER_CVAR3("r_ShadersGL4", CV_r_shadersGL4, 0, VF_NULL, "");
REGISTER_CVAR3("r_ShadersGLES3", CV_r_shadersGLES3, 0, VF_NULL, "");
REGISTER_CVAR3("r_ShadersDurango", CV_r_shadersdurango, 0, VF_NULL, "");
REGISTER_CVAR3("r_ShadersMETAL", CV_r_shadersMETAL, 0, VF_NULL, "");
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION RENDERER_CPP_SECTION_15
@@ -2075,7 +2075,6 @@ public:
static int CV_r_shadersdx11;
static int CV_r_shadersGL4;
static int CV_r_shadersGLES3;
static int CV_r_shadersdurango;
static int CV_r_shadersMETAL;
#if defined(AZ_RESTRICTED_PLATFORM)
@@ -338,11 +338,6 @@ enum EVerifyType
#define _USE_MATH_DEFINES
#include <math.h>
// nv API
#if (defined(WIN32) || defined(WIN64)) && !defined(NULL_RENDERER) && !defined(OPENGL) && !defined(CRY_USE_DX12)
#define USE_NV_API
#endif
// windows desktop API available for usage
#if defined(WIN32) || defined(WIN64)
#define WINDOWS_DESKTOP_API
+6 -206
View File
@@ -507,20 +507,7 @@ bool CResFile::mfPrepareDir()
{
assert(!m_Dir.size());
pFileDir = new SDirEntry[m_nNumFilesUnique];
if (m_version == RESVERSION_LZSS)
{
if (!Decodem(m_pCompressedDir, (byte*)pFileDir, m_nComprDirSize, sizeof(SDirEntry) * m_nNumFilesUnique))
{
CryFatalError("Compressed res file directory corrupt!");
}
}
else if (m_version == RESVERSION_LZMA)
{
SizeT size = sizeof(SDirEntry) * m_nNumFilesUnique;
SizeT inSize = m_nComprDirSize;
int res = Lzma86_Decode((byte*)pFileDir, &size, m_pCompressedDir, &inSize);
}
else if (m_version == RESVERSION_DEBUG)
if (m_version == RESVERSION_DEBUG)
{
memcpy(pFileDir, m_pCompressedDir, sizeof(SDirEntry) * m_nNumFilesUnique);
}
@@ -699,7 +686,7 @@ int CResFile::mfOpen(int type, CResFileLookupDataMan* pMan, SResStreamInfo* pStr
mfSetError("Open - Wrong header MagicID");
return 0;
}
if (frh.ver != RESVERSION_LZSS && frh.ver != RESVERSION_LZMA && frh.ver != RESVERSION_DEBUG)
if (frh.ver != RESVERSION_DEBUG)
{
mfSetError("Open - Wrong version number");
return 0;
@@ -1011,24 +998,6 @@ void CResStreamCallback::StreamAsyncOnComplete(IReadStream* pStream, unsigned nE
byte* pData = NULL;
int32 size;
if (pDE->flags & RF_COMPRESS)
{
assert(pRes->m_version == RESVERSION_LZSS);
size = *(int32*)pBuf;
if (size < 10000000)
{
pData = new byte[size];
if (!pData)
{
pRes->mfSetError("FileRead - Allocation fault");
}
else if (!Decodem(&pBuf[4], (byte*)pData, pDE->size - 4, size))
{
pRes->mfSetError("FileRead - Decode fault");
}
}
}
else
{
size = pDE->size;
pData = new byte[size];
@@ -1167,68 +1136,7 @@ int CResFile::mfFileRead(SDirEntry* de)
mfSetError("FileRead - Allocation fault");
return 0;
}
if (m_version == RESVERSION_LZSS)
{
gEnv->pCryPak->FReadRaw(buf, de->size, 1, m_fileHandle);
size = *(int32*)buf;
if (m_bSwapEndianRead)
{
SwapEndian(size, eBigEndian);
}
if (size >= 10000000)
{
SAFE_DELETE_ARRAY(buf);
return 0;
}
pOE->pData = new byte[size];
de->flags |= RF_TEMPDATA;
if (!pOE->pData)
{
SAFE_DELETE_ARRAY(buf);
mfSetError("FileRead - Allocation fault");
return 0;
}
if (!Decodem(&buf[4], (byte*)pOE->pData, de->size - 4, size))
{
SAFE_DELETE_ARRAY(buf);
mfSetError("FileRead - Decodem fault");
return 0;
}
}
else if (m_version == RESVERSION_LZMA)
{
SizeT inSize = de->size;
gEnv->pCryPak->FReadRaw(buf, inSize, 1, m_fileHandle);
uint64 outSize64;
if (Lzma86_GetUnpackSize(buf, inSize, &outSize64) != 0)
{
delete[] buf;
mfSetError("FileRead - data error");
return 0;
}
SizeT outSize = (uint32)outSize64;
if (outSize != 0)
{
uint8* outBuffer = (uint8*)MyAlloc(outSize);
if (outBuffer == 0)
{
delete[] buf;
mfSetError("FileRead - can't allocate");
return 0;
}
SRes res = Lzma86_Decode(outBuffer, &outSize, buf, &inSize);
if (res != 0)
{
delete[] buf;
mfSetError("FileRead - LzmaDecoder error");
return 0;
}
size = outSize;
pOE->pData = outBuffer;
de->flags |= RF_TEMPDATA;
}
}
else if (m_version == RESVERSION_DEBUG)
if (m_version == RESVERSION_DEBUG)
{
gEnv->pCryPak->FReadRaw(buf, de->size, 1, m_fileHandle);
pOE->pData = new byte[de->size - 20];
@@ -1322,38 +1230,7 @@ byte* CResFile::mfFileReadCompressed(SDirEntry* de, uint32& nSizeDecomp, uint32&
mfSetError("FileRead - Allocation fault");
return 0;
}
if (m_version == RESVERSION_LZSS)
{
int nSize = -1;
gEnv->pCryPak->FReadRaw(&nSize, 1, sizeof(int), m_fileHandle);
if (m_bSwapEndianRead)
{
SwapEndian(nSize, eBigEndian);
}
if (nSize <= 0)
{
assert(0);
SAFE_DELETE_ARRAY(buf);
return NULL;
}
nSizeDecomp = nSize;
nSizeComp = de->size - 4;
gEnv->pCryPak->FReadRaw(buf, nSizeComp, 1, m_fileHandle);
}
else if (m_version == RESVERSION_LZMA)
{
uint32 inSize = de->size;
gEnv->pCryPak->FReadRaw(buf, inSize, 1, m_fileHandle);
uint64 outSize64;
if (Lzma86_GetUnpackSize(buf, inSize, &outSize64) != 0)
{
mfSetError("FileRead - data error");
return 0;
}
nSizeDecomp = (uint32)outSize64;
nSizeComp = inSize;
}
else if (m_version == RESVERSION_DEBUG)
if (m_version == RESVERSION_DEBUG)
{
gEnv->pCryPak->FReadRaw(buf, 10, 1, m_fileHandle);
gEnv->pCryPak->FReadRaw(buf, de->size - 20, 1, m_fileHandle);
@@ -1696,32 +1573,7 @@ int CResFile::mfFlushDir(long nOffset, [[maybe_unused]] bool bOptimise)
byte* buf = NULL;
if (m_bDirCompressed)
{
#if RES_COMPRESSION == RESVERSION_LZSS
buf = new byte[sizeUn * 2 + 128];
if (!buf)
{
mfSetError("FlushDir - Allocation fault");
return false;
}
sizeUn = Encodem((byte*)&FDir[0], buf, sizeUn);
#elif RES_COMPRESSION == RESVERSION_LZMA
// we allocate 105% of original size for output buffer
uint32 outSize = sizeUn / 20 * 21 + (1 << 16);
buf = (byte*)MyAlloc(outSize);
if (!buf)
{
mfSetError("FlushDir - Allocation fault");
return false;
}
uint32 dict = 1 << 23;
int res = Lzma86_Encode(buf, &outSize, (byte*)&FDir[0], sizeUn, 5, dict, SZ_FILTER_AUTO);
if (res != 0)
{
mfSetError("FlushDir - Encoder error = %d", res);
return 1;
}
sizeUn = outSize;
#elif RES_COMPRESSION == RESVERSION_DEBUG
#if RES_COMPRESSION == RESVERSION_DEBUG
buf = new byte [sizeUn];
memcpy(buf, (byte*)&FDir[0], sizeUn);
#else
@@ -1887,59 +1739,7 @@ int CResFile::mfFlush(bool bOptimise)
if (de->flags & RF_COMPRESS)
{
byte* buf = NULL;
#if RES_COMPRESSION == RESVERSION_LZSS
if (!(de->flags & RF_COMPRESSED))
{
buf = new byte[de->size * 2 + 128];
if (!buf)
{
mfSetError("Flush - Allocation fault");
return nSizeDir;
}
int sizeEnc = Encodem((byte*)pOE->pData, &buf[4], de->size);
int nS = de->size;
if (m_bSwapEndianWrite)
{
SwapEndian(nS, eBigEndian);
}
*(int*)buf = nS;
de->size = sizeEnc + 4;
}
else
{
buf = (byte*)pOE->pData;
if (m_bSwapEndianWrite)
{
int nS = *(int*)buf;
SwapEndian(nS, eBigEndian);
*(int*)buf = nS;
}
}
#elif RES_COMPRESSION == RESVERSION_LZMA
// we allocate 105% of original size for output buffer
if (!(de->flags & RF_COMPRESSED))
{
uint32 outSize = de->size / 20 * 21 + (1 << 16);
buf = (byte*)MyAlloc(outSize);
if (!buf)
{
mfSetError("Flush - Allocation fault");
return nSizeDir;
}
uint32 dict = 1 << 23;
int res = Lzma86_Encode(buf, &outSize, (byte*)pOE->pData, de->size, 5, dict, SZ_FILTER_AUTO);
if (res != 0)
{
mfSetError("Flush - Encoder error = %d", res);
return nSizeDir;
}
de->size = outSize;
}
else
{
buf = (byte*)pOE->pData;
}
#elif RES_COMPRESSION == RESVERSION_DEBUG
#if RES_COMPRESSION == RESVERSION_DEBUG
buf = new byte [de->size + 20];
memcpy(buf, ">>rawbuf>>", 10);
memcpy(buf + 10, (byte*)pOE->pData, de->size);
+1 -6
View File
@@ -17,15 +17,10 @@
#include "CryName.h"
#define IDRESHEADER (('K' << 24) + ('C' << 16) + ('P' << 8) + 'C')
#define RESVERSION_LZSS 10 // LZSS
#define RESVERSION_LZMA 11 // LZMA
#define RESVERSION_DEBUG 12 // Uncompressed
// defines the current compression for any files written
#define RES_COMPRESSION RESVERSION_LZSS
#include <LZSS.H>
#include <Lzma86.h>
#define RES_COMPRESSION RESVERSION_DEBUG
// Resource files flags
#define RF_NOTSAVED 1
@@ -167,7 +167,7 @@ bool CResFileLookupDataMan::LoadData(
gEnv->pCryPak->FClose(fileHandle);
return false;
}
if (versionInfo.m_ResVersion != RESVERSION_LZSS && versionInfo.m_ResVersion != RESVERSION_LZMA && versionInfo.m_ResVersion != RESVERSION_DEBUG)
if (versionInfo.m_ResVersion != RESVERSION_DEBUG)
{
gEnv->pCryPak->FClose(fileHandle);
return false;
@@ -242,7 +242,6 @@ enum EShaderLanguage
{
eSL_Unknown,
eSL_Orbis,
eSL_Durango,
eSL_D3D11,
eSL_GL4_1,
eSL_GL4_4,
@@ -198,8 +198,6 @@ struct SShaderBin
uint32 ComputeCRC();
void SetCRC(uint32 nCRC) { m_CRC32 = nCRC; }
void CryptData();
int Size()
{
int nSize = sizeof(SShaderBin);
@@ -728,7 +728,6 @@ void CParserBin::Init()
FX_REGISTER_TOKEN(24);
FX_REGISTER_TOKEN(ORBIS);
FX_REGISTER_TOKEN(DURANGO);
FX_REGISTER_TOKEN(PCDX11);
FX_REGISTER_TOKEN(GL4);
FX_REGISTER_TOKEN(GLES3);
@@ -1103,26 +1102,6 @@ void CParserBin::SetupForJasper()
gRenDev->m_cEF.m_pGlobalExt = gRenDev->m_cEF.mfCreateShaderGenInfo("RunTime", true);
}
void CParserBin::SetupForDurango()
{
CleanPlatformMacros();
SetupTargetPlatform();
uint32 nMacro[1] = {eT_1};
m_nPlatform = SF_DURANGO;
SetupShadersCacheAndFilter();
AddMacro(CParserBin::fxToken("DURANGO"), nMacro, 1, 0, m_StaticMacros);
SetupFeatureDefines();
gRenDev->m_cEF.m_Bin.InvalidateCache();
gRenDev->m_cEF.mfInitLookups();
SAFE_DELETE(gRenDev->m_cEF.m_pGlobalExt);
gRenDev->m_cEF.m_pGlobalExt = gRenDev->m_cEF.mfCreateShaderGenInfo("RunTime", true);
}
CCryNameTSCRC CParserBin::GetPlatformSpecName(CCryNameTSCRC orgName)
{
CCryNameTSCRC nmTemp = orgName;
@@ -1313,7 +1292,6 @@ bool CParserBin::RemoveMacro(uint32 dwName, FXMacroBin& Macro)
void CParserBin::CleanPlatformMacros()
{
RemoveMacro(CParserBin::fxToken("DURANGO"), m_StaticMacros);
RemoveMacro(CParserBin::fxToken("ORBIS"), m_StaticMacros);
RemoveMacro(CParserBin::fxToken("PCDX11"), m_StaticMacros);
RemoveMacro(CParserBin::fxToken("GL4"), m_StaticMacros);
@@ -3682,7 +3660,7 @@ void CParserBin::SetupFeatureDefines()
uint32 nEnable[1] = { eT_1 };
#if defined(MESH_TESSELLATION)
if (m_nPlatform == SF_D3D11 || m_nPlatform == SF_DURANGO || m_nPlatform == SF_GL4)
if (m_nPlatform == SF_D3D11 || m_nPlatform == SF_GL4)
{
AddMacro(CParserBin::GetCRC32("FEATURE_MESH_TESSELLATION"), nEnable, 1, 0, m_StaticMacros);
}
@@ -3696,13 +3674,13 @@ void CParserBin::SetupFeatureDefines()
}
#endif
#if defined(PARTICLES_TESSELLATION)
if (m_nPlatform == SF_D3D11 || m_nPlatform == SF_DURANGO || m_nPlatform == SF_JASPER || m_nPlatform == SF_ORBIS || m_nPlatform == SF_GL4)
if (m_nPlatform == SF_D3D11 || m_nPlatform == SF_JASPER || m_nPlatform == SF_ORBIS || m_nPlatform == SF_GL4)
{
AddMacro(CParserBin::GetCRC32("FEATURE_PARTICLES_TESSELLATION"), nEnable, 1, 0, m_StaticMacros);
}
#endif
if (m_nPlatform == SF_DURANGO || m_nPlatform == SF_JASPER || m_nPlatform == SF_ORBIS || m_nPlatform == SF_D3D11 || m_nPlatform == SF_GL4 || m_nPlatform == SF_GLES3 || m_nPlatform == SF_METAL)
if (m_nPlatform == SF_JASPER || m_nPlatform == SF_ORBIS || m_nPlatform == SF_D3D11 || m_nPlatform == SF_GL4 || m_nPlatform == SF_GLES3 || m_nPlatform == SF_METAL)
{
AddMacro(CParserBin::GetCRC32("FEATURE_SPI_CONSTANT_BUFFERS"), nEnable, 1, 0, m_StaticMacros);
}
@@ -3714,7 +3692,7 @@ void CParserBin::SetupFeatureDefines()
#endif
}
if (m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_DURANGO | SF_JASPER | SF_GL4))
if (m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_JASPER | SF_GL4))
{
AddMacro(CParserBin::GetCRC32("FEATURE_GEOMETRY_SHADERS"), nEnable, 1, 0, m_StaticMacros);
}
@@ -3723,7 +3701,7 @@ void CParserBin::SetupFeatureDefines()
AddMacro(CParserBin::GetCRC32("FEATURE_SVO_GI"), nEnable, 1, 0, m_StaticMacros);
#endif
if (m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_DURANGO | SF_JASPER | SF_GL4))
if (m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_JASPER | SF_GL4))
{
AddMacro(CParserBin::GetCRC32("FEATURE_DUAL_SOURCE_BLENDING"), nEnable, 1, 0, m_StaticMacros);
}
@@ -3734,7 +3712,7 @@ void CParserBin::SetupFeatureDefines()
const bool isMacOpenGl = false;
#endif
if ((m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_DURANGO | SF_JASPER)) || (isMacOpenGl == false && m_nPlatform & (SF_GL4)))
if ((m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_JASPER)) || (isMacOpenGl == false && m_nPlatform & (SF_GL4)))
{
// Disable FEATURE_8_BONE_SKINNING because structurebuffer sb_SkinExtraBlendWeights is not handled in the code currently.
// AddMacro(CParserBin::GetCRC32("FEATURE_8_BONE_SKINNING"), nEnable, 1, 0, m_StaticMacros);
@@ -647,7 +647,6 @@ enum EToken
eT_AnisotropyLevel,
eT_ORBIS,
eT_DURANGO,
eT_PCDX11,
eT_GL4,
eT_GLES3,
@@ -833,7 +832,6 @@ struct SortByToken
#define SF_GLES3 0x08000000
#define SF_D3D11 0x10000000
#define SF_ORBIS 0x20000000
#define SF_DURANGO 0x40000000
#define SF_GL4 0x80000000
#define SF_PLATFORM 0xfc000000
@@ -1023,22 +1021,21 @@ public:
static void SetupForGMEM(int gmemPath);
static void SetupGMEMCommonStaticFlags();
static void RemoveGMEMStaticFlags();
static void SetupForDurango();
static void SetupForJasper();
static void SetupFeatureDefines();
static void SetupShadersCacheAndFilter();
static CCryNameTSCRC GetPlatformSpecName(CCryNameTSCRC orgName);
static bool PlatformSupportsConstantBuffers(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL); };
static bool PlatformSupportsGeometryShaders(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4); }
static bool PlatformSupportsHullShaders(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4); }
static bool PlatformSupportsDomainShaders(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4); }
static bool PlatformSupportsConstantBuffers(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL); };
static bool PlatformSupportsGeometryShaders(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4); }
static bool PlatformSupportsHullShaders(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4); }
static bool PlatformSupportsDomainShaders(){return (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4); }
static bool PlatformSupportsComputeShaders()
{
bool ret = (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_METAL || CParserBin::m_nPlatform == SF_GLES3);
bool ret = (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_METAL || CParserBin::m_nPlatform == SF_GLES3);
return ret;
}
static bool PlatformIsConsole(){return (CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER); };
static bool PlatformIsConsole(){return (CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER); };
static bool m_bEditable;
static uint32 m_nPlatform; // Shader language
@@ -349,10 +349,6 @@ namespace NRemoteCompiler
shaderCompiler = eSC_Orbis_DXC;
break;
case eSL_Durango:
shaderCompiler = eSC_Durango_FXC;
break;
case eSL_Jasper:
shaderCompiler = eSC_Jasper_FXC;
break;
@@ -383,7 +379,6 @@ namespace NRemoteCompiler
{
"Unknown",
"Orbis_DXC",
"Durango_FXC",
"D3D11_FXC",
"GLSL_HLSLcc",
"METAL_HLSLcc",
@@ -463,10 +458,6 @@ namespace NRemoteCompiler
#define AZ_RESTRICTED_SECTION REMOTECOMPILER_CPP_SECTION_2
#include AZ_RESTRICTED_FILE_EXPLICIT(Shaders/RemoteCompiler_cpp, provo)
#endif
#if defined(TOOLS_SUPPORT_XENIA)
#define AZ_RESTRICTED_SECTION REMOTECOMPILER_CPP_SECTION_2
#include AZ_RESTRICTED_FILE_EXPLICIT(Shaders/RemoteCompiler_cpp, xenia)
#endif
#if defined(TOOLS_SUPPORT_JASPER)
#define AZ_RESTRICTED_SECTION REMOTECOMPILER_CPP_SECTION_2
#include AZ_RESTRICTED_FILE_EXPLICIT(Shaders/RemoteCompiler_cpp, jasper)
@@ -479,11 +470,10 @@ namespace NRemoteCompiler
break;
// ----------------------------------------
case eSC_Durango_FXC:
case eSC_Jasper_FXC:
case eSC_D3D11_FXC:
{
const char* extraFlags = (shaderCompiler==eSC_Durango_FXC) ? "/Gis" : "";
const char* extraFlags = "";
const char* debugFlags = "";
if IsCVarConstAccess(constexpr) (CRenderer::CV_r_shadersdebug == 3)
@@ -36,7 +36,6 @@ namespace NRemoteCompiler
{
eSC_Unknown,
eSC_Orbis_DXC,
eSC_Durango_FXC,
eSC_D3D11_FXC,
eSC_GLSL_HLSLcc,
eSC_METAL_HLSLcc,
@@ -28,8 +28,8 @@
// bump this value up if you want to invalidate shader cache (e.g. changed some code or .ext file)
// #### VIP NOTE ####: DON'T USE MORE THAN ONE DECIMAL PLACE!!!! else it doesn't work...
#define FX_CACHE_VER 10.4f
#define FX_SER_CACHE_VER 1.3f // Shader serialization version (FX_CACHE_VER + FX_SER_CACHE_VER)
#define FX_CACHE_VER 10.5f
#define FX_SER_CACHE_VER 1.4f // Shader serialization version (FX_CACHE_VER + FX_SER_CACHE_VER)
// Maximum 1 digit here
// The version determines the parse logic in the shader cache gen, these values cannot overlap
@@ -1466,16 +1466,6 @@ void CShaderMan::AddRTCombinations(FXShaderCacheCombinations& CmbsMap, CHWShader
nBitsPlatform |= SHGD_HW_ORBIS;
}
else
if (CParserBin::m_nPlatform == SF_DURANGO)
{
nBitsPlatform |= SHGD_HW_DURANGO;
}
else
if (CParserBin::m_nPlatform == SF_JASPER)
{
nBitsPlatform |= SHGD_HW_DURANGO;
}
else
if (CParserBin::m_nPlatform == SF_D3D11)
{
nBitsPlatform |= SHGD_HW_DX11;
@@ -1835,7 +1825,7 @@ void CShaderMan::_PrecacheShaderList(bool bStatsOnly)
}
}
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_GL4)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_GL4)
{
CHWShader* d3d11Shaders[] = { pPass->m_GShader, pPass->m_HShader, pPass->m_CShader, pPass->m_DShader };
for (int i2 = 0; i2 < 4; i2++)
@@ -2014,23 +2004,6 @@ void CShaderMan::mfPrecacheShaders(bool bStatsOnly)
_PrecacheShaderList(bStatsOnly);
}
else
if (CRenderer::CV_r_shadersdurango)
{
gRenDev->m_bDeviceSupportsFP16Filter = true;
gRenDev->m_bDeviceSupportsFP16Separate = false;
gRenDev->m_bDeviceSupportsGeometryShaders = true;
gRenDev->m_Features |= RFT_HW_SM30;
CParserBin::m_bShaderCacheGen = true;
gRenDev->m_Features |= RFT_HW_SM50;
CParserBin::SetupForDurango();
CryLogAlways("\nStarting shader compilation for Durango...");
mfInitShadersList(NULL);
mfPreloadShaderExts();
_PrecacheShaderList(bStatsOnly);
}
else
if (CRenderer::CV_r_shadersdx11)
{
gRenDev->m_bDeviceSupportsFP16Filter = true;
@@ -2123,12 +2096,6 @@ void CShaderMan::mfGetShaderList()
CParserBin::SetupForOrbis();
}
else
if (CRenderer::CV_r_shadersdurango)
{
CParserBin::m_bShaderCacheGen = true;
CParserBin::SetupForDurango();
}
else
if (CRenderer::CV_r_shadersdx11)
{
CParserBin::m_bShaderCacheGen = true;
@@ -192,10 +192,6 @@ EShaderLanguage GetShaderLanguage()
{
shaderLanguage = eSL_Orbis;
}
else if (CParserBin::m_nPlatform == SF_DURANGO)
{
shaderLanguage = eSL_Durango;
}
else if (CParserBin::m_nPlatform == SF_D3D11)
{
shaderLanguage = eSL_D3D11;
@@ -226,7 +222,6 @@ const char* GetShaderLanguageName()
{
"Unknown",
"Orbis",
"Durango",
"D3D11",
"GL4",
"GL4",
@@ -246,7 +241,6 @@ const char* GetShaderLanguageResourceName()
{
"(UNK)",
"(O)",
"(D)",
"(DX1)",
"(G4)",
"(G4)",
@@ -3427,7 +3421,7 @@ const char* CHWShader::mfProfileString(EHWShaderClass eClass)
szProfile = "ps_5_0";
break;
case eHWSC_Geometry:
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4)
{
szProfile = "gs_5_0";
}
@@ -3437,7 +3431,7 @@ const char* CHWShader::mfProfileString(EHWShaderClass eClass)
}
break;
case eHWSC_Domain:
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4)
{
szProfile = "ds_5_0";
}
@@ -3447,7 +3441,7 @@ const char* CHWShader::mfProfileString(EHWShaderClass eClass)
}
break;
case eHWSC_Hull:
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4)
{
szProfile = "hs_5_0";
}
@@ -3457,7 +3451,7 @@ const char* CHWShader::mfProfileString(EHWShaderClass eClass)
}
break;
case eHWSC_Compute:
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_METAL || CParserBin::m_nPlatform == SF_GLES3)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_METAL || CParserBin::m_nPlatform == SF_GLES3)
{
szProfile = "cs_5_0";
}
@@ -56,17 +56,6 @@ void CShaderManBin::GetMemoryUsage(ICrySizer* pSizer) const
}
}
void SShaderBin::CryptData()
{
uint32 i;
uint32* pData = &m_Tokens[0];
uint32 CRC32 = m_CRC32;
for (i = 0; i < m_Tokens.size(); i++)
{
pData[i] ^= CRC32;
}
}
uint32 SShaderBin::ComputeCRC()
{
if (!m_Tokens.size())
@@ -309,8 +298,6 @@ SShaderBin* CShaderManBin::SaveBinShader(
pBin->SetCRC(pBin->ComputeCRC());
pBin->m_bReadOnly = false;
//pBin->CryptData();
//pBin->CryptTable();
char nameFile[256];
sprintf_s(nameFile, "%s%s.%s", m_pCEF->m_ShadersCache.c_str(), szName, bInclude ? "cfib" : "cfxb");
@@ -906,7 +893,6 @@ SShaderBin* CShaderManBin::LoadBinShader(AZ::IO::HandleType fpBin, const char* s
SwapEndian(&pBin->m_Tokens[0], (size_t)Header.m_nTokens, eBigEndian);
}
//pBin->CryptData();
int nSizeTable = Header.m_nOffsetParamsLocal - Header.m_nOffsetStringTable;
if (nSizeTable < 0)
{
@@ -2959,7 +2945,7 @@ void CShaderManBin::AddAffectedParameter(CParserBin& Parser, std::vector<SFXPara
int nFlags = pParam->GetFlags();
bool bCheckAffect = CParserBin::m_bParseFX ? true : false;
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL)
{
CRY_ASSERT(eSHClass < eHWSC_Num);
if (((nFlags & PF_TWEAKABLE_MASK) || pParam->m_Values.c_str()[0] == '(') && pParam->m_Register[eSHClass] >= 0 && pParam->m_Register[eSHClass] < 1000)
@@ -3960,7 +3946,7 @@ bool CShaderManBin::ParseBinFX_Technique_Pass_GenerateShaderData(CParserBin& Par
Parser.CopyTokens(cf, SHData, Replaces, NewTokens, h);
if (cf->m_eType == eFT_Sampler)
{
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL)
{
int nT = Parser.m_Tokens[cf->m_nLastToken - 1];
//CRY_ASSERT(nT >= eT_s0 && nT <= eT_s15);
@@ -5248,7 +5234,7 @@ bool CShaderManBin::ParseBinFX(SShaderBin* pBin, CShader* ef, uint64 nMaskGen)
}
}
else
if (CParserBin::m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_DURANGO | SF_JASPER | SF_GL4 | SF_GLES3 | SF_METAL))
if (CParserBin::m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_JASPER | SF_GL4 | SF_GLES3 | SF_METAL))
{
uint32 nTokName = Parser.GetToken(Parser.m_Name);
const char* name = Parser.GetString(nTokName);
@@ -229,11 +229,6 @@ SShaderGenBit* CShaderMan::mfCompileShaderGenProperty(char* scr)
shgm->m_nDependencySet |= SHGD_USER_ENABLED;
}
else
if (!azstricmp(data, "$HW_DURANGO"))
{
shgm->m_nDependencySet |= SHGD_HW_DURANGO;
}
else
if (!azstricmp(data, "$HW_ORBIS"))
{
shgm->m_nDependencySet |= SHGD_HW_ORBIS;
@@ -405,11 +400,6 @@ SShaderGenBit* CShaderMan::mfCompileShaderGenProperty(char* scr)
shgm->m_nDependencyReset |= SHGD_HW_METAL;
}
else
if (!azstricmp(data, "$HW_DURANGO"))
{
shgm->m_nDependencyReset |= SHGD_HW_DURANGO;
}
else
if (!azstricmp(data, "$HW_ORBIS"))
{
shgm->m_nDependencyReset |= SHGD_HW_ORBIS;
@@ -688,7 +688,7 @@ bool CShaderMan::mfModifyGenFlags(CShader* efGen, const CShaderResources* pRes,
{
// during shader cache gen, disable the special features in non D3D11 mode, and just accept
// the lines as they come in D3D11 mode
if (CParserBin::m_nPlatform != SF_D3D11 && CParserBin::m_nPlatform != SF_DURANGO && CParserBin::m_nPlatform != SF_JASPER && CParserBin::m_nPlatform != SF_GL4 && CParserBin::m_nPlatform != SF_ORBIS)
if (CParserBin::m_nPlatform != SF_D3D11 && CParserBin::m_nPlatform != SF_JASPER && CParserBin::m_nPlatform != SF_GL4 && CParserBin::m_nPlatform != SF_ORBIS)
{
if (pBit->m_nDependencySet & SHGD_HW_WATER_TESSELLATION)
{
@@ -567,10 +567,6 @@ bool CImageDDSFile::SetHeaderFromMemory(byte* pFileStart, byte* pFileAfterHeader
#define AZ_RESTRICTED_SECTION IMAGEEXTENSIONHELPER_H_SECTION_ISNATIVE
#include AZ_RESTRICTED_FILE_EXPLICIT(Textures/Image/DDSImage_cpp, provo)
#endif
#if defined(AZ_PLATFORM_XENIA) || defined(TOOLS_SUPPORT_XENIA)
#define AZ_RESTRICTED_SECTION IMAGEEXTENSIONHELPER_H_SECTION_ISNATIVE
#include AZ_RESTRICTED_FILE_EXPLICIT(Textures/Image/DDSImage_cpp, xenia)
#endif
#if defined(AZ_PLATFORM_JASPER) || defined(TOOLS_SUPPORT_JASPER)
#define AZ_RESTRICTED_SECTION IMAGEEXTENSIONHELPER_H_SECTION_ISNATIVE
#include AZ_RESTRICTED_FILE_EXPLICIT(Textures/Image/DDSImage_cpp, jasper)
@@ -1871,26 +1871,6 @@ public:
void Readback(AZ::u32 subresourceIndex, StagingHook callback) override;
const bool IsStreamableNonVirtual() const { return !(m_nFlags & FT_DONT_STREAM) && !(m_eTT == eTT_3D); }
ILINE void DisableMgpuSync()
{
// TODO: CRY_INTEGRATE_DX12 MGPU TEMPORARILY DISABLE
#if !defined(NULL_RENDERER) && (defined(WIN32) || defined(WIN64)) && !defined(OPENGL) && !defined(CRY_INTEGRATE_DX12)
if (m_pDevTexture)
{
m_pDevTexture->DisableMgpuSync();
}
#endif
}
ILINE void MgpuResourceUpdate([[maybe_unused]] bool bUpdating = true)
{
#if defined(USE_NV_API)
if (m_pDevTexture)
{
m_pDevTexture->MgpuResourceUpdate(bUpdating);
}
#endif
}
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION TEXTURE_H_SECTION_5
@@ -34,10 +34,6 @@ ly_add_target(
..
.
${pal_dir}
BUILD_DEPENDENCIES
INTERFACE
3rdParty::LZSS
3rdParty::Lzma
)
################################################################################
@@ -72,8 +68,6 @@ if(CRYRENDER_TRAIT_BUILD_DX11_SUPPORTED AND NOT LY_MONOLITHIC_GAME) # only Atom
${pal_tool_dirs}
BUILD_DEPENDENCIES
PUBLIC
3rdParty::LZSS
3rdParty::Lzma
Legacy::CryCommon
Legacy::CryCommon.EngineSettings.Static
)
@@ -156,8 +150,6 @@ if(CRYRENDER_TRAIT_BUILD_DX12_SUPPORTED AND NOT LY_MONOLITHIC_GAME) # only Atom
#EXCLUDE_CINEMIZER_SDK
BUILD_DEPENDENCIES
PUBLIC
3rdParty::LZSS
3rdParty::Lzma
Legacy::CryCommon
)
ly_add_source_properties(
@@ -27,10 +27,6 @@
#define D3DAMBIENTOCCLUSION_CPP_SECTION_2 2
#endif
#ifdef USE_NV_API
#include <nvapi.h>
#endif
// TODO: Unify with other deferred primitive implementation
const t_arrDeferredMeshVertBuff& CD3D9Renderer::GetDeferredUnitBoxVertexBuffer() const
{
@@ -107,9 +103,6 @@ void CD3D9Renderer::SetDepthBoundTest(float fMin, float fMax, bool bEnable)
#elif defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION D3DAMBIENTOCCLUSION_CPP_SECTION_1
#include AZ_RESTRICTED_FILE(D3DAmbientOcclusion_cpp)
#elif defined (USE_NV_API) //transparent execution without NVDB
NvAPI_Status status = NvAPI_D3D11_SetDepthBoundsTest(&GetDevice(), bEnable, fMin, fMax);
assert(status == NVAPI_OK);
#endif
}
else // disable depth bound test
@@ -121,9 +114,6 @@ void CD3D9Renderer::SetDepthBoundTest(float fMin, float fMax, bool bEnable)
#elif defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION D3DAMBIENTOCCLUSION_CPP_SECTION_2
#include AZ_RESTRICTED_FILE(D3DAmbientOcclusion_cpp)
#elif defined (USE_NV_API)
NvAPI_Status status = NvAPI_D3D11_SetDepthBoundsTest(&GetDevice(), bEnable, fMin, fMax);
assert(status == NVAPI_OK);
#endif
}
}
@@ -4561,7 +4561,7 @@ ED3DShError CHWShader_D3D::mfFallBack(SHWSInstance*& pInst, int nStatus)
// - ShadowGen pass
// - Z-prepass
// - Shadow-pass
if (CParserBin::m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_DURANGO | SF_JASPER | SF_GL4 | SF_GLES3 | SF_METAL))
if (CParserBin::m_nPlatform & (SF_D3D11 | SF_ORBIS | SF_JASPER | SF_GL4 | SF_GLES3 | SF_METAL))
{
//assert(gRenDev->m_cEF.m_nCombinationsProcess >= 0);
return ED3DShError_CompilingError;
@@ -1067,16 +1067,6 @@ void CHWShader_D3D::mfSetDefaultRT(uint64& nAndMask, uint64& nOrMask)
nBitsPlatform |= SHGD_HW_ORBIS;
}
else
if (CParserBin::m_nPlatform == SF_DURANGO)
{
nBitsPlatform |= SHGD_HW_DURANGO;
}
else
if (CParserBin::m_nPlatform == SF_JASPER)
{
nBitsPlatform |= SHGD_HW_DURANGO;
}
else
if (CParserBin::m_nPlatform == SF_D3D11)
{
nBitsPlatform |= SHGD_HW_DX11;
@@ -1630,7 +1620,7 @@ bool CHWShader_D3D::mfGenerateScript(CShader* pSH, SHWSInstance*& pInst, std::ve
CParserBin::AddDefineToken(eT__FT_SKIN_STREAM, NewTokens);
}
#if ENABLE_NORMALSTREAM_SUPPORT
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_ORBIS || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3)
{
if (nStreams & VSM_NORMALS)
{
@@ -2300,8 +2290,6 @@ SShaderDevCache* CHWShader::mfInitDevCache(const char* name, [[maybe_unused]] CH
return new SShaderDevCache(cryShaderName);
}
#include <LZSS.H>
SShaderCacheHeaderItem* CHWShader_D3D::mfGetCompressedItem([[maybe_unused]] uint32 nFlags, int32& nSize)
{
SHWSInstance* pInst = m_pCurInst;
@@ -2352,7 +2340,6 @@ SShaderCacheHeaderItem* CHWShader_D3D::mfGetCompressedItem([[maybe_unused]] uint
return NULL;
}
pInst->m_DeviceObjectID = nDevID;
Decodem(CD.m_pCompressedShader, pData, CD.m_nSizeCompressedShader);
SShaderCacheHeaderItem* pIt = (SShaderCacheHeaderItem*)pData;
if (CParserBin::m_bEndians)
{
@@ -4005,7 +3992,7 @@ bool CHWShader_D3D::mfCompileHLSL_Int(CShader* pSH, char* prog_text, LPD3D10BLOB
static bool s_logOnce_WrongPlatform = false;
# if !defined(OPENGL)
# if !defined(_RELEASE)
if (!s_logOnce_WrongPlatform && !(CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO))
if (!s_logOnce_WrongPlatform && !(CParserBin::m_nPlatform == SF_D3D11))
{
s_logOnce_WrongPlatform = true;
iLog->LogError("Trying to build non DX11 shader via internal compiler which is not supported. Please use remote compiler instead!");
@@ -4110,7 +4097,7 @@ void CHWShader_D3D::mfPrepareShaderDebugInfo(SHWSInstance* pInst, CHWShader_D3D*
}
}
// Confetti Nicholas Baldwin: adding metal shader language support
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL)
if (CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_JASPER || CParserBin::m_nPlatform == SF_GL4 || CParserBin::m_nPlatform == SF_GLES3 || CParserBin::m_nPlatform == SF_METAL)
{
ID3D11ShaderReflection* pShaderReflection = (ID3D11ShaderReflection*) pConstantTable;
@@ -4823,7 +4810,7 @@ bool CAsyncShaderTask::CompileAsyncShader(SShaderAsyncInfo* pAsync)
{
static bool s_logOnce_WrongPlatform = false;
# if !defined(_RELEASE)
if (!s_logOnce_WrongPlatform && !(CParserBin::m_nPlatform == SF_D3D11 || CParserBin::m_nPlatform == SF_DURANGO))
if (!s_logOnce_WrongPlatform && !(CParserBin::m_nPlatform == SF_D3D11))
{
s_logOnce_WrongPlatform = true;
iLog->LogError("Trying to build non DX11 shader via internal compiler which is not supported. Please use remote compiler instead!");
@@ -25,10 +25,6 @@
#define D3DSTEREO_CPP_SECTION_2 2
#endif
#if defined(USE_NV_API)
#include <nvapi.h>
#endif
#include <MathConversion.h>
CD3DStereoRenderer::CD3DStereoRenderer(CD3D9Renderer& renderer, EStereoDevice device)
@@ -90,31 +86,6 @@ void CD3DStereoRenderer::SelectDefaultDevice()
void CD3DStereoRenderer::InitDeviceBeforeD3D()
{
LOADING_TIME_PROFILE_SECTION;
#if defined(USE_NV_API)
bool availableDriverNV = false;
uint8 enabled = 0;
// Always set direct mode so that the NV driver never does its own stereo
if (NvAPI_Initialize() == NVAPI_OK &&
NvAPI_Stereo_SetDriverMode(NVAPI_STEREO_DRIVER_MODE_DIRECT) == NVAPI_OK &&
NvAPI_Stereo_IsEnabled(&enabled) == NVAPI_OK)
{
if (!enabled)
{
iLog->LogWarning("3DVision is disabled in control panel");
}
else
{
availableDriverNV = true;
}
}
if (!availableDriverNV && m_device == STEREO_DEVICE_DRIVER && CRenderer::CV_r_StereoDevice == STEREO_DEVICE_DEFAULT)
{
// Fall back to frame-compatible device
m_device = STEREO_DEVICE_FRAMECOMP;
}
#endif
if (m_device == STEREO_DEVICE_NONE)
{
@@ -124,35 +95,7 @@ void CD3DStereoRenderer::InitDeviceBeforeD3D()
bool success = true;
m_deviceState = STEREO_DEVSTATE_UNSUPPORTED_DEVICE;
#if defined(USE_NV_API)
if (m_device == STEREO_DEVICE_DRIVER)
{
if (availableDriverNV)
{
m_driver = DRIVER_NV;
}
else
{
success = false;
m_deviceState = STEREO_DEVSTATE_BAD_DRIVER;
}
}
else if (m_device == STEREO_DEVICE_DUALHEAD)
{
ICVar* cvar = iConsole->GetCVar("r_Fullscreen");
bool fullscreen = gEnv->IsEditor() ? false : cvar && cvar->GetIVal() > 0;
if (!fullscreen)
{
success = false;
m_deviceState = STEREO_DEVSTATE_REQ_FULLSCREEN;
}
}
else if (m_device == STEREO_DEVICE_HDMI)
{
success = false;
}
#elif defined(AZ_RESTRICTED_PLATFORM)
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION D3DSTEREO_CPP_SECTION_2
#include AZ_RESTRICTED_FILE(D3DStereo_cpp)
#endif
@@ -172,30 +115,6 @@ void CD3DStereoRenderer::InitDeviceBeforeD3D()
void CD3DStereoRenderer::InitDeviceAfterD3D()
{
LOADING_TIME_PROFILE_SECTION;
#if defined(USE_NV_API)
if (IsDriver(DRIVER_NV))
{
if (m_nvStereoHandle)
{
NvAPI_Stereo_DestroyHandle(m_nvStereoHandle);
m_nvStereoHandle = NULL;
}
void* pStereoHandle;
D3DDevice* device = &m_renderer.GetDevice();
if (NvAPI_Stereo_CreateHandleFromIUnknown(device, &pStereoHandle) == NVAPI_OK)
{
m_nvStereoHandle = pStereoHandle;
}
else
{
m_device = STEREO_DEVICE_NONE;
}
DisableStereo(); // Always disabled at startup
}
#endif
// Note: Resources will be created in EF_Init, so no need to create them here
AZ::StereoRendererRequestBus::Handler::BusConnect();
@@ -234,14 +153,6 @@ void CD3DStereoRenderer::Shutdown()
ReleaseResources();
ShutdownHmdRenderer();
#if defined(USE_NV_API)
if (m_nvStereoHandle)
{
NvAPI_Stereo_DestroyHandle(m_nvStereoHandle);
m_nvStereoHandle = NULL;
}
#endif
}
@@ -259,28 +170,6 @@ void CD3DStereoRenderer::ReleaseResources()
bool CD3DStereoRenderer::EnableStereo()
{
#if defined(USE_NV_API)
if (IsDriver(DRIVER_NV))
{
uint8 windowedSupport = 0;
NvAPI_Stereo_IsWindowedModeSupported(&windowedSupport);
if (m_renderer.m_bFullScreen || windowedSupport)
{
NvAPI_Stereo_Activate(m_nvStereoHandle);
NvAPI_Stereo_SetNotificationMessage(m_nvStereoHandle, NULL, NULL);
NvAPI_Stereo_SetActiveEye(m_nvStereoHandle, NVAPI_STEREO_EYE_LEFT);
return true;
}
else
{
NvAPI_Stereo_Deactivate(m_nvStereoHandle);
iLog->LogError("3DVision requires fullscreen mode");
return false;
}
}
#endif
if (!m_hmdRenderer)
{
return InitializeHmdRenderer();
@@ -292,13 +181,6 @@ bool CD3DStereoRenderer::EnableStereo()
void CD3DStereoRenderer::DisableStereo()
{
#if defined(USE_NV_API)
if (IsDriver(DRIVER_NV))
{
NvAPI_Stereo_Deactivate(m_nvStereoHandle);
}
#endif
m_gammaAdjustment = 0;
ShutdownHmdRenderer();
@@ -347,13 +229,6 @@ void CD3DStereoRenderer::ShutdownHmdRenderer()
void CD3DStereoRenderer::PrepareStereo(EStereoMode mode, EStereoOutput output)
{
#if defined(USE_NV_API)
if (IsDriver(DRIVER_NV))
{
HandleNVControl();
}
#endif
if (m_mode != mode || m_output != output)
{
m_renderer.ForceFlushRTCommands();
@@ -415,15 +290,6 @@ void CD3DStereoRenderer::PrepareStereo(EStereoMode mode, EStereoOutput output)
void CD3DStereoRenderer::HandleNVControl()
{
#if defined(USE_NV_API)
if (m_stereoStrength != CRenderer::CV_r_StereoStrength)
{
NvAPI_Stereo_SetSeparation(m_nvStereoHandle, clamp_tpl((CRenderer::CV_r_StereoStrength - 0.5f) * 100.f, 0.f, 100.f));
}
NvAPI_Stereo_IsActivated(m_nvStereoHandle, &m_nvStereoActivated);
NvAPI_Stereo_GetSeparation(m_nvStereoHandle, &m_nvStereoStrength);
#endif
}
@@ -642,16 +508,6 @@ void CD3DStereoRenderer::DisplayStereo()
GetUtils().DrawFullScreenTri(width, height);
#if defined(USE_NV_API)
if (IsDriver(DRIVER_NV) && m_nvStereoActivated)
{
NvAPI_Stereo_SetActiveEye(m_nvStereoHandle, NVAPI_STEREO_EYE_RIGHT);
GetUtils().SetTexture(!CRenderer::CV_r_StereoFlipEyes ? GetRightEye() : GetLeftEye(), 0, FILTER_LINEAR);
GetUtils().DrawFullScreenTri(width, height);
NvAPI_Stereo_SetActiveEye(m_nvStereoHandle, NVAPI_STEREO_EYE_LEFT);
}
#endif
pSH->FXEndPass();
pSH->FXEnd();
@@ -62,17 +62,6 @@
#define RegisterClass RegisterClassA
#define LoadLibrary LoadLibraryA
#endif // !UNICODE
#if !defined(AZ_MONOLITHIC_BUILD)
// We cannot use the static version of this library, it has exceptions disabled and was compiled with
// _MSC_VER 1600
// _ITERATOR_DEBUG_LEVEL' 0
// So linking fails. We are disabling this functionality for monolithic
#include <amd_ags.h>
#endif
#include <nvapi.h>
#endif // defined(WIN32)
#if defined(AZ_RESTRICTED_PLATFORM)
@@ -2017,126 +2006,6 @@ bool CD3D9Renderer::CheckSSAAChange()
}
//==========================================================================
void CD3D9Renderer::InitAMDAPI()
{
#if defined (WIN32) && !defined(AZ_MONOLITHIC_BUILD)
AGSReturnCode status = AGSInit();
iLog->Log("AGS: AMD GPU Services API init %s (%d)", status == AGS_SUCCESS ? "ok" : "failed", status);
m_bVendorLibInitialized = status == AGS_SUCCESS;
if (!m_bVendorLibInitialized)
{
return;
}
AGSDriverVersionInfoStruct driverInfo = {};
status = AGSDriverGetVersionInfo(&driverInfo);
if (status != AGS_SUCCESS)
{
iLog->LogError("AGS: Unable to get driver version (%d)", status);
}
else
{
iLog->Log("AGS: Catalyst Version: %s Driver Version: %s", driverInfo.strCatalystVersion, driverInfo.strDriverVersion);
}
int outputIndex = 0;
#if defined (SUPPORT_DEVICE_INFO)
outputIndex = (int)m_devInfo.OutputIndex();
#else
if (AGSGetDefaultDisplayIndex(&outputIndex) != AGS_SUCCESS)
{
outputIndex = 0;
}
#endif
m_nGPUs = 1;
int numGPUs = 1;
status = AGSCrossfireGetGPUCount(outputIndex, &numGPUs);
if (status != AGS_SUCCESS)
{
iLog->LogError("AGS: Unable to get crossfire info (%d)", status);
}
else
{
m_nGPUs = numGPUs;
iLog->Log("AGS: Multi GPU count = %d", numGPUs);
}
#endif // defined(WIN32)
}
void CD3D9Renderer::InitNVAPI()
{
#if defined(WIN32) && !defined(OPENGL)
NvAPI_Status stat = NvAPI_Initialize();
iLog->Log("NVAPI: API init %s (%d)", stat ? "failed" : "ok", stat);
m_bVendorLibInitialized = stat == 0;
if (!m_bVendorLibInitialized)
{
return;
}
NvU32 version2;
char branchVersion[NVAPI_SHORT_STRING_MAX];
NvAPI_Status status = NvAPI_SYS_GetDriverAndBranchVersion(&version2, branchVersion);
if (status != NVAPI_OK)
{
iLog->LogError("NVAPI: Unable to get driver version (%d)", status);
}
SetNvidiaDriverVersion(version2);
// enumerate displays
for (int i = 0; i < NVAPI_MAX_DISPLAYS; ++i)
{
NvDisplayHandle displayHandle;
status = NvAPI_EnumNvidiaDisplayHandle(i, &displayHandle);
if (status != NVAPI_OK)
{
break;
}
}
m_nGPUs = 1;
// check SLI state to get number of GPUs available for rendering
NV_GET_CURRENT_SLI_STATE sliState;
sliState.version = NV_GET_CURRENT_SLI_STATE_VER;
D3DDevice* device = NULL;
# if defined(DIRECT3D10)
device = &GetDevice();
# elif defined(DIRECT3D9)
device = m_pd3dDevice;
# endif
status = NvAPI_D3D_GetCurrentSLIState(device, &sliState);
if (status != NVAPI_OK)
{
iLog->LogError("NVAPI: Unable to get SLI state (%d)", status);
}
else
{
m_nGPUs = sliState.numAFRGroups;
if (m_nGPUs < 2)
{
iLog->Log("NVAPI: Single GPU system");
}
else
{
m_nGPUs = min((int)m_nGPUs, 31);
iLog->Log("NVAPI: System configured as SLI: %d GPU(s) for rendering", m_nGPUs);
}
}
m_bDeviceSupports_NVDBT = 1;
iLog->Log("NVDBT supported");
#endif // defined(WIN32)
}
bool CD3D9Renderer::SetRes()
{
LOADING_TIME_PROFILE_SECTION;
@@ -2436,13 +2305,11 @@ HRESULT CALLBACK CD3D9Renderer::OnD3D11CreateDevice(D3DDevice* pd3dDevice)
if (adapterDesc.VendorId == RenderCapabilities::s_gpuVendorIdAMD)
{
rd->m_Features |= RFT_HW_ATI;
rd->InitAMDAPI();
iLog->Log ("D3D Detected: AMD video card");
}
else if (adapterDesc.VendorId == RenderCapabilities::s_gpuVendorIdNVIDIA)
{
rd->m_Features |= RFT_HW_NVIDIA;
rd->InitNVAPI();
iLog->Log ("D3D Detected: NVIDIA video card");
}
else if (adapterDesc.VendorId == RenderCapabilities::s_gpuVendorIdQualcomm)
@@ -372,7 +372,6 @@ void CVolumetricFog::CreateResources()
m_fogInscatteringVolume[i] = CTexture::CreateTextureObject(tname[i], w, h, d, eTT_3D, flags, format);
const byte* pData[6] = {NULL};
m_fogInscatteringVolume[i]->CreateDeviceTexture(pData);
m_fogInscatteringVolume[i]->DisableMgpuSync();
if (m_fogInscatteringVolume[i]->GetFlags() & FT_FAILED)
{
@@ -531,7 +530,6 @@ void CVolumetricFog::CreateResources()
uint32 flags = commonFlags | FT_USAGE_UNORDERED_ACCESS;
m_fogDensityVolume[i] = CTexture::CreateTextureObject(tname[i], w, h, d, eTT_3D, flags, format);
m_fogDensityVolume[i]->CreateRenderTarget(format);
m_fogDensityVolume[i]->DisableMgpuSync();
if (m_fogDensityVolume[i]->GetFlags() & FT_FAILED)
{
@@ -1695,8 +1695,6 @@ void CSvoRenderer::CheckCreateUpdateRT(CTexture*& pTex, int nWidth, int nHeight,
SD3DPostEffectsUtils::CreateRenderTarget(szNameEx, pTex, nWidth, nHeight, Clr_Unknown, false, false, eTF);
pTex->DisableMgpuSync();
//iLog->Log("Realloc RT %dx%d, %s, %s", nWidth, nHeight, CTexture::NameForTextureFormat(eTF), szName);
}
}
@@ -47,10 +47,8 @@ if(DXGL_TRAIT_BUILD_OPENGL_SUPPORTED AND (NOT LY_MONOLITHIC_GAME OR LY_TRAIT_USE
PUBLIC
AZ::AzFramework
AZ::HLSLcc.Headers
3rdParty::Lzma
3rdParty::LZSS
3rdParty::lz4
3rdParty::GLAD
3rdParty::glad
Legacy::CryCommon
)
ly_add_source_properties(
@@ -18,6 +18,4 @@ set(LY_BUILD_DEPENDENCIES
wininet
Shell32
ws2_32
3rdParty::nvapi
3rdParty::AMD
)
@@ -42,8 +42,6 @@ if(DXGL_TRAIT_BUILD_DXMETAL_SUPPORTED AND NOT LY_MONOLITHIC_GAME) # Only Atom is
PUBLIC
AZ::AzFramework
AZ::HLSLcc.Headers
3rdParty::Lzma
3rdParty::LZSS
Legacy::CryCommon
Legacy::CryCommon.EngineSettings.Static
)
@@ -50,11 +50,6 @@
#include "DeviceManager_D3D12.inl"
#else
#include "DeviceManager_D3D11.inl"
#if defined(USE_NV_API)
#include "DeviceManager_D3D11_NVAPI.h"
#include "DeviceManager_D3D11_NVAPI.inl"
#endif
#endif
CDeviceManager::CDeviceManager()
@@ -1093,10 +1088,6 @@ int CDeviceTexture::Cleanup()
#include AZ_RESTRICTED_FILE(DeviceManager_cpp)
#endif
#if defined(USE_NV_API)
m_handleMGPU = NULL;
#endif
return nRef;
}
@@ -43,10 +43,6 @@
#define AZ_RESTRICTED_SECTION DEVICEMANAGER_H_SECTION_1
#include AZ_RESTRICTED_FILE(DeviceManager_h)
# endif
# if defined(USE_NV_API)
# include "DeviceManager_D3D11_NVAPI.h"
# endif
#endif
#if defined(AZ_RESTRICTED_PLATFORM)
@@ -482,10 +478,6 @@ class CDeviceTexture
void* m_pStagingMemoryUpload[NUM_UPLOAD_STAGING_RES];
#endif
#if defined(USE_NV_API)
void* m_handleMGPU;
#endif
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION DEVICEMANAGER_H_SECTION_9
#include AZ_RESTRICTED_FILE(DeviceManager_h)
@@ -523,20 +515,12 @@ public:
void Unbind();
#if defined(USE_NV_API)
void DisableMgpuSync();
void MgpuResourceUpdate(bool bUpdating = true);
#endif
CDeviceTexture ()
: m_pD3DTexture(NULL)
, m_nBaseAllocatedSize(0)
, m_bNoDelete(false)
, m_bCube(false)
, m_numSubResources(0)
#if defined(USE_NV_API)
, m_handleMGPU(NULL)
#endif
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION DEVICEMANAGER_H_SECTION_10
#include AZ_RESTRICTED_FILE(DeviceManager_h)
@@ -558,9 +542,6 @@ public:
, m_bNoDelete(false)
, m_bCube(false)
, m_numSubResources(0)
#if defined(USE_NV_API)
, m_handleMGPU(NULL)
#endif
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION DEVICEMANAGER_H_SECTION_11
#include AZ_RESTRICTED_FILE(DeviceManager_h)
@@ -582,9 +563,6 @@ public:
, m_bNoDelete(false)
, m_bCube(true)
, m_numSubResources(0)
#if defined(USE_NV_API)
, m_handleMGPU(NULL)
#endif
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION DEVICEMANAGER_H_SECTION_12
#include AZ_RESTRICTED_FILE(DeviceManager_h)
@@ -1,17 +0,0 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
* a third party where indicated.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#if defined(USE_NV_API)
#include <nvapi.h>
#endif
@@ -1,65 +0,0 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#if defined(USE_NV_API)
void CDeviceTexture::DisableMgpuSync()
{
if (gRenDev->m_bVendorLibInitialized && (gRenDev->GetFeatures() & RFT_HW_NVIDIA))
{
NVDX_ObjectHandle handle = (NVDX_ObjectHandle&)m_handleMGPU;
if (handle == NULL)
{
NvAPI_Status status = NvAPI_D3D_GetObjectHandleForResource(&gcpRendD3D->GetDevice(), m_pD3DTexture, &handle);
assert(status == NVAPI_OK);
m_handleMGPU = handle;
}
//if (nWidth >= 4 && nHeight >= 4)
{
NvU32 value = 1;
// disable driver watching this texture - it will never be synced unless requested by the application
NvAPI_Status status = NvAPI_D3D_SetResourceHint(&gcpRendD3D->GetDevice(), handle, NVAPI_D3D_SRH_CATEGORY_SLI, NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC, &value);
assert(status == NVAPI_OK);
}
}
}
void CDeviceTexture::MgpuResourceUpdate(bool bUpdating)
{
if (gcpRendD3D->m_bVendorLibInitialized && (gRenDev->GetFeatures() & RFT_HW_NVIDIA))
{
ID3D11Device* pDevice = &gcpRendD3D->GetDevice();
NVDX_ObjectHandle handle = (NVDX_ObjectHandle&)m_handleMGPU;
if (handle == NULL)
{
NvAPI_Status status = NvAPI_D3D_GetObjectHandleForResource(pDevice, m_pD3DTexture, &handle);
assert(status == NVAPI_OK);
m_handleMGPU = handle;
}
if (handle)
{
NvAPI_Status status = NVAPI_OK;
if (bUpdating)
{
status = NvAPI_D3D_BeginResourceRendering(pDevice, handle, NVAPI_D3D_RR_FLAG_FORCE_DISCARD_CONTENT);
}
else
{
status = NvAPI_D3D_EndResourceRendering(pDevice, handle, 0);
}
// TODO: Verify that NVAPI_WAS_STILL_DRAWING is valid here
assert(status == NVAPI_OK || status == NVAPI_WAS_STILL_DRAWING);
}
}
}
#endif
@@ -56,10 +56,6 @@
#include "D3D_SVO.h"
#endif
#if defined(WIN32) && !defined(OPENGL)
#include <nvapi.h> // NVAPI
#endif
#if (defined (WIN32) || defined(WIN64)) && !defined(OPENGL)
# include <D3Dcompiler.h>
#endif
@@ -2058,8 +2058,6 @@ public:
//////////////////////////////////////////////////////////////////////////
public:
bool IsDeviceLost() { return(m_bDeviceLost != 0); }
void InitNVAPI();
void InitAMDAPI();
#if defined(FEATURE_SVO_GI)
virtual ISvoRenderer* GetISvoRenderer();
@@ -12,6 +12,4 @@
set(LY_BUILD_DEPENDENCIES
PRIVATE
d3d11
3rdParty::nvapi
3rdParty::AMD
)
@@ -11,8 +11,6 @@
set(LY_BUILD_DEPENDENCIES
PUBLIC
3rdParty::nvapi
3rdParty::AMD
d3d12
dxgi
)
@@ -172,8 +172,6 @@ set(FILES
DeviceManager/TempDynBuffer.h
DeviceManager/DeviceManager.h
DeviceManager/DeviceManager_D3D11.inl
DeviceManager/DeviceManager_D3D11_NVAPI.h
DeviceManager/DeviceManager_D3D11_NVAPI.inl
DeviceManager/DeviceManager_D3D12.inl
DeviceManager/DeviceWrapper12.h
DeviceManager/DeviceWrapper12.cpp
@@ -36,8 +36,6 @@ if(CRYRENDER_TRAIT_BUILD_NULL_RENDERER_SUPPORTED)
${pal_dir}
BUILD_DEPENDENCIES
PUBLIC
3rdParty::LZSS
3rdParty::Lzma
Legacy::CryCommon
Legacy::CryCommon.EngineSettings.Static
)