fix build issue with intel compiler and fix some unsafe string usages, patch by FilthyMonkey
This commit is contained in:
parent
e76bc71efe
commit
d3e639a397
|
@ -143,7 +143,7 @@ private:
|
||||||
#define _M_SSE 0x301
|
#define _M_SSE 0x301
|
||||||
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||||
#define _M_SSE 0x301
|
#define _M_SSE 0x301
|
||||||
#elif _MSC_VER >= 1500 // Visual Studio 2008
|
#elif (_MSC_VER >= 1500) || __INTEL_COMPILER // Visual Studio 2008
|
||||||
#define _M_SSE 0x402
|
#define _M_SSE 0x402
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,12 @@ const char *scm_rev_str = "Dolphin "
|
||||||
#if !SCM_IS_MASTER
|
#if !SCM_IS_MASTER
|
||||||
"[" SCM_BRANCH_STR "] "
|
"[" SCM_BRANCH_STR "] "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __INTEL_COMPILER
|
||||||
|
BUILD_TYPE_STR SCM_DESC_STR "-ICC";
|
||||||
|
#else
|
||||||
BUILD_TYPE_STR SCM_DESC_STR;
|
BUILD_TYPE_STR SCM_DESC_STR;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _M_X64
|
#ifdef _M_X64
|
||||||
#define NP_ARCH "x64"
|
#define NP_ARCH "x64"
|
||||||
|
|
|
@ -187,14 +187,15 @@ bool LineGeometryShader::SetShader(u32 components, float lineWidth,
|
||||||
p = GenerateVSOutputStruct(p, components, API_D3D11);
|
p = GenerateVSOutputStruct(p, components, API_D3D11);
|
||||||
p += sprintf(p, "\n%s", LINE_GS_COMMON);
|
p += sprintf(p, "\n%s", LINE_GS_COMMON);
|
||||||
|
|
||||||
std::stringstream numTexCoordsStr;
|
std::stringstream numTexCoordsStream;
|
||||||
numTexCoordsStr << xfregs.numTexGen.numTexGens;
|
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "Compiling line geometry shader for components 0x%.08X (num texcoords %d)",
|
INFO_LOG(VIDEO, "Compiling line geometry shader for components 0x%.08X (num texcoords %d)",
|
||||||
components, xfregs.numTexGen.numTexGens);
|
components, xfregs.numTexGen.numTexGens);
|
||||||
|
|
||||||
|
const std::string& numTexCoordsStr = numTexCoordsStream.str();
|
||||||
D3D_SHADER_MACRO macros[] = {
|
D3D_SHADER_MACRO macros[] = {
|
||||||
{ "NUM_TEXCOORDS", numTexCoordsStr.str().c_str() },
|
{ "NUM_TEXCOORDS", numTexCoordsStr.c_str() },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
ID3D11GeometryShader* newShader = D3D::CompileAndCreateGeometryShader(code, unsigned int(strlen(code)), macros);
|
ID3D11GeometryShader* newShader = D3D::CompileAndCreateGeometryShader(code, unsigned int(strlen(code)), macros);
|
||||||
|
|
|
@ -181,14 +181,15 @@ bool PointGeometryShader::SetShader(u32 components, float pointSize,
|
||||||
p = GenerateVSOutputStruct(p, components, API_D3D11);
|
p = GenerateVSOutputStruct(p, components, API_D3D11);
|
||||||
p += sprintf(p, "\n%s", POINT_GS_COMMON);
|
p += sprintf(p, "\n%s", POINT_GS_COMMON);
|
||||||
|
|
||||||
std::stringstream numTexCoordsStr;
|
std::stringstream numTexCoordsStream;
|
||||||
numTexCoordsStr << xfregs.numTexGen.numTexGens;
|
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "Compiling point geometry shader for components 0x%.08X (num texcoords %d)",
|
INFO_LOG(VIDEO, "Compiling point geometry shader for components 0x%.08X (num texcoords %d)",
|
||||||
components, xfregs.numTexGen.numTexGens);
|
components, xfregs.numTexGen.numTexGens);
|
||||||
|
|
||||||
|
const std::string& numTexCoordsStr = numTexCoordsStream.str();
|
||||||
D3D_SHADER_MACRO macros[] = {
|
D3D_SHADER_MACRO macros[] = {
|
||||||
{ "NUM_TEXCOORDS", numTexCoordsStr.str().c_str() },
|
{ "NUM_TEXCOORDS", numTexCoordsStr.c_str() },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
ID3D11GeometryShader* newShader = D3D::CompileAndCreateGeometryShader(code, unsigned int(strlen(code)), macros);
|
ID3D11GeometryShader* newShader = D3D::CompileAndCreateGeometryShader(code, unsigned int(strlen(code)), macros);
|
||||||
|
|
Loading…
Reference in New Issue