Skip white space between $input/$output.

This commit is contained in:
Branimir Karadžić 2014-10-31 21:54:35 -07:00
parent 4bb7714da8
commit 748da31049
3 changed files with 12 additions and 2 deletions
3rdparty/glsl-optimizer/src
tools/shaderc

View file

@ -374,7 +374,7 @@ void ir_print_metal_visitor::newline_deindent()
void ir_print_metal_visitor::print_var_name (ir_variable* v)
{
long id = (long)hash_table_find (globals->var_hash, v);
uintptr_t id = (uintptr_t)hash_table_find (globals->var_hash, v);
if (!id && v->data.mode == ir_var_temporary)
{
id = ++globals->var_counter;
@ -543,7 +543,7 @@ void ir_print_metal_visitor::visit(ir_variable *ir)
// give an id to any variable defined in a function that is not an uniform
if ((this->mode == kPrintGlslNone && ir->data.mode != ir_var_uniform))
{
long id = (long)hash_table_find (globals->var_hash, ir);
uintptr_t id = (uintptr_t)hash_table_find (globals->var_hash, ir);
if (id == 0)
{
id = ++globals->var_counter;

View file

@ -247,6 +247,14 @@ static inline GLuint CPU_TO_LE32(GLuint x)
#define M_PI (3.14159265358979323846)
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923
#endif
#ifndef M_PI_4
#define M_PI_4 0.78539816339744830962
#endif
#ifndef M_E
#define M_E (2.7182818284590452354)
#endif

View file

@ -2032,6 +2032,8 @@ int main(int _argc, const char* _argv[])
raw = true;
str += 3;
}
input = const_cast<char*>(bx::strws(input) );
}
if (!raw)