Updated glsl-compiler.
This commit is contained in:
parent
db6cc187ca
commit
e78545af88
@ -50,6 +50,8 @@ typedef struct token_list token_list_t;
|
||||
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
// Could be int, but results in some bugs with parsing of #version directives
|
||||
// in Apple LLVM Compiler 4.2 when building for 32 bit.
|
||||
int ival;
|
||||
char *str;
|
||||
string_list_t *string_list;
|
||||
|
@ -239,11 +239,6 @@ public:
|
||||
bool progress;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// BK - 'gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2'
|
||||
// If destroy_links is inlined code crashes in n->remove().
|
||||
__attribute__((noinline))
|
||||
#endif // defined(__GNUC__)
|
||||
static void
|
||||
destroy_links(exec_list *list, function *f)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../talloc;../../../include;../../mesa;../../mapi;../../../include/c99"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;__STDC_VERSION__=199901L;__STDC__;strdup=_strdup"
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -113,7 +113,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../talloc;../../../include;../../mesa;../../mapi;../../../include/c99"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;__STDC_VERSION__=199901L;__STDC__;strdup=_strdup"
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -182,7 +182,7 @@
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="../../talloc;../../../include;../../mesa;../../mapi;../../../include/c99"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;__STDC_VERSION__=199901L;__STDC__;strdup=_strdup"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
@ -251,7 +251,7 @@
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="../../talloc;../../../include;../../mesa;../../mapi;../../../include/c99"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;__STDC_VERSION__=199901L;__STDC__;strdup=_strdup"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
|
@ -1,19 +1,19 @@
|
||||
// Used to expose bugs in constant variable optimization,
|
||||
// when variables were deemed constant not taking into
|
||||
// account branches or previous dereferences of them.
|
||||
|
||||
uniform float mode;
|
||||
float func (float c) {
|
||||
if (mode == 2.0)
|
||||
return c;
|
||||
if (mode == 3.0)
|
||||
discard;
|
||||
if (mode == 10.0)
|
||||
c = 0.1;
|
||||
return c;
|
||||
}
|
||||
void main() {
|
||||
vec4 c = gl_FragCoord;
|
||||
c.x = func(c.x);
|
||||
gl_FragColor = c;
|
||||
}
|
||||
// Used to expose bugs in constant variable optimization,
|
||||
// when variables were deemed constant not taking into
|
||||
// account branches or previous dereferences of them.
|
||||
|
||||
uniform float mode;
|
||||
float func (float c) {
|
||||
if (mode == 2.0)
|
||||
return c;
|
||||
if (mode == 3.0)
|
||||
discard;
|
||||
if (mode == 10.0)
|
||||
c = 0.1;
|
||||
return c;
|
||||
}
|
||||
void main() {
|
||||
vec4 c = gl_FragCoord;
|
||||
c.x = func(c.x);
|
||||
gl_FragColor = c;
|
||||
}
|
||||
|
@ -436,9 +436,9 @@ int main (int argc, const char** argv)
|
||||
float timeDelta = float(time1-time0)/CLOCKS_PER_SEC;
|
||||
|
||||
if (errors != 0)
|
||||
printf ("\n**** %i tests (%.2fsec), %i !!!FAILED!!!\n", tests, timeDelta, errors);
|
||||
printf ("\n**** %i tests (%.2fsec), %i !!!FAILED!!!\n", (int)tests, timeDelta, (int)errors);
|
||||
else
|
||||
printf ("\n**** %i tests (%.2fsec) succeeded\n", tests, timeDelta);
|
||||
printf ("\n**** %i tests (%.2fsec) succeeded\n", (int)tests, timeDelta);
|
||||
|
||||
// 3.25s
|
||||
// with builtin call linking, 3.84s
|
||||
|
Loading…
Reference in New Issue
Block a user