mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-27 21:40:23 +00:00
Fix Windows build, try 3.
This commit is contained in:
parent
98362e5934
commit
f8d2936840
@ -182,11 +182,12 @@ bool LineGeometryShader::SetShader(u32 components, float lineWidth,
|
|||||||
if (shaderIt == m_shaders.end())
|
if (shaderIt == m_shaders.end())
|
||||||
{
|
{
|
||||||
// Generate new shader. Warning: not thread-safe.
|
// Generate new shader. Warning: not thread-safe.
|
||||||
static char code[16384];
|
static char buffer[16384];
|
||||||
char* p = code;
|
ShaderCode<u32> code;
|
||||||
p = GenerateVSOutputStruct(p, components, API_D3D11);
|
code.SetBuffer(buffer);
|
||||||
p += sprintf(p, "\n%s", LINE_GS_COMMON);
|
GenerateVSOutputStruct(code, components, API_D3D11);
|
||||||
|
code.Write("\n%s", LINE_GS_COMMON);
|
||||||
|
|
||||||
std::stringstream numTexCoordsStream;
|
std::stringstream numTexCoordsStream;
|
||||||
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
||||||
|
|
||||||
@ -198,7 +199,7 @@ bool LineGeometryShader::SetShader(u32 components, float lineWidth,
|
|||||||
{ "NUM_TEXCOORDS", numTexCoordsStr.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.GetBuffer(), unsigned int(strlen(code.GetBuffer())), macros);
|
||||||
if (!newShader)
|
if (!newShader)
|
||||||
{
|
{
|
||||||
WARN_LOG(VIDEO, "Line geometry shader for components 0x%.08X failed to compile", components);
|
WARN_LOG(VIDEO, "Line geometry shader for components 0x%.08X failed to compile", components);
|
||||||
|
@ -176,10 +176,11 @@ bool PointGeometryShader::SetShader(u32 components, float pointSize,
|
|||||||
if (shaderIt == m_shaders.end())
|
if (shaderIt == m_shaders.end())
|
||||||
{
|
{
|
||||||
// Generate new shader. Warning: not thread-safe.
|
// Generate new shader. Warning: not thread-safe.
|
||||||
static char code[16384];
|
static char buffer[16384];
|
||||||
char* p = code;
|
ShaderCode<u32> code;
|
||||||
p = GenerateVSOutputStruct(p, components, API_D3D11);
|
code.SetBuffer(buffer);
|
||||||
p += sprintf(p, "\n%s", POINT_GS_COMMON);
|
GenerateVSOutputStruct(code, components, API_D3D11);
|
||||||
|
code.Write("\n%s", POINT_GS_COMMON);
|
||||||
|
|
||||||
std::stringstream numTexCoordsStream;
|
std::stringstream numTexCoordsStream;
|
||||||
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
||||||
@ -192,7 +193,7 @@ bool PointGeometryShader::SetShader(u32 components, float pointSize,
|
|||||||
{ "NUM_TEXCOORDS", numTexCoordsStr.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.GetBuffer(), unsigned int(strlen(code.GetBuffer())), macros);
|
||||||
if (!newShader)
|
if (!newShader)
|
||||||
{
|
{
|
||||||
WARN_LOG(VIDEO, "Point geometry shader for components 0x%.08X failed to compile", components);
|
WARN_LOG(VIDEO, "Point geometry shader for components 0x%.08X failed to compile", components);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user