Move program_defaults init statement into variable declaration

In original code, the init value for "program_defaults.register_type"
is put inside main(), which may be hard to maintain.
This commit is contained in:
Homer Hsing 2012-09-14 10:02:53 +08:00 committed by Damien Lespiau
parent 77dcc41cfd
commit 940522588a

View File

@ -48,7 +48,7 @@ char *export_filename = NULL;
const char const *binary_prepend = "static const char gen_eu_bytes[] = {\n";
struct brw_program compiled_program;
struct program_defaults program_defaults;
struct program_defaults program_defaults = {.register_type = BRW_REGISTER_TYPE_F};
#define HASHSZ 37
@ -271,8 +271,6 @@ int main(int argc, char **argv)
}
}
program_defaults.register_type = BRW_REGISTER_TYPE_F;
err = yyparse();
if (strcmp(argv[0], "-"))