Fixed variable shadowing.

This commit is contained in:
Branimir Karadžić 2015-04-04 19:45:45 -07:00
parent 1e8051fd00
commit efed576e75
3 changed files with 21 additions and 19 deletions
3rdparty/glsl-optimizer/src/glsl
scripts
tools/geometryc

View file

@ -36,21 +36,20 @@
void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
_mesa_reference_shader(struct gl_context *, struct gl_shader **ptr,
struct gl_shader *sh)
{
(void) ctx;
*ptr = sh;
}
void
_mesa_shader_debug(struct gl_context *, GLenum, GLuint *id,
_mesa_shader_debug(struct gl_context *, GLenum, GLuint *,
const char *, int)
{
}
extern "C" void
_mesa_error_no_memory(const char *caller)
_mesa_error_no_memory(const char *)
{
}

View file

@ -35,6 +35,9 @@ project "shaderc"
buildoptions {
"-fno-strict-aliasing" -- glsl-optimizer has bugs if strict aliasing is used.
}
removebuildoptions {
"-Wshadow", -- glsl-optimizer is full of -Wshadow warnings ignore it.
}
configuration { "osx" }
links {
@ -51,7 +54,7 @@ project "shaderc"
"$(DXSDK_DIR)/include",
}
configuration { "windows" }
links {
"d3dx9",

View file

@ -724,9 +724,9 @@ int main(int _argc, const char* _argv[])
{
hasTexcoord = true;
for (Index3Map::iterator it = indexMap.begin(), itEnd = indexMap.end(); it != itEnd; ++it)
for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd; ++jt)
{
it->second.m_texcoord = it->second.m_position;
jt->second.m_texcoord = jt->second.m_position;
}
}
@ -735,9 +735,9 @@ int main(int _argc, const char* _argv[])
{
hasNormal = true;
for (Index3Map::iterator it = indexMap.begin(), itEnd = indexMap.end(); it != itEnd; ++it)
for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd; ++jt)
{
it->second.m_normal = it->second.m_position;
jt->second.m_normal = jt->second.m_position;
}
}
}
@ -848,14 +848,14 @@ int main(int _argc, const char* _argv[])
triReorderElapsed -= bx::getHPCounter();
for (PrimitiveArray::const_iterator primIt = primitives.begin(); primIt != primitives.end(); ++primIt)
{
const Primitive& prim = *primIt;
triangleReorder(indexData + prim.m_startIndex, prim.m_numIndices, numVertices, 32);
const Primitive& prim1 = *primIt;
triangleReorder(indexData + prim1.m_startIndex, prim1.m_numIndices, numVertices, 32);
if (compress)
{
triangleCompress(&memWriter
, indexData + prim.m_startIndex
, prim.m_numIndices
, vertexData + prim.m_startVertex
, indexData + prim1.m_startIndex
, prim1.m_numIndices
, vertexData + prim1.m_startVertex
, numVertices
, stride
);
@ -968,14 +968,14 @@ int main(int _argc, const char* _argv[])
triReorderElapsed -= bx::getHPCounter();
for (PrimitiveArray::const_iterator primIt = primitives.begin(); primIt != primitives.end(); ++primIt)
{
const Primitive& prim = *primIt;
triangleReorder(indexData + prim.m_startIndex, prim.m_numIndices, numVertices, 32);
const Primitive& prim1 = *primIt;
triangleReorder(indexData + prim1.m_startIndex, prim1.m_numIndices, numVertices, 32);
if (compress)
{
triangleCompress(&memWriter
, indexData + prim.m_startIndex
, prim.m_numIndices
, vertexData + prim.m_startVertex
, indexData + prim1.m_startIndex
, prim1.m_numIndices
, vertexData + prim1.m_startVertex
, numVertices
, stride
);